Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
rebuild: finish dangling timer event
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Sep 8, 2020
1 parent 58547d6 commit 5492920
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/arborist/rebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ module.exports = cls => class Builder extends cls {
if (this[_trashList].has(path))
return

process.emit('time', `build:run:${event}:${node.location}`)
const timer = `build:run:${event}:${node.location}`
process.emit('time', timer)
const p = runScript({
event,
path,
Expand All @@ -209,8 +210,9 @@ module.exports = cls => class Builder extends cls {
scriptShell: this[_scriptShell],
})

return this[_doHandleOptionalFailure]
? this[_handleOptionalFailure](node, p) : p
return (this[_doHandleOptionalFailure]
? this[_handleOptionalFailure](node, p) : p)
.then(() => process.emit('timeEnd', timer))
}))
process.emit('timeEnd', `build:run:${event}`)
}
Expand Down

0 comments on commit 5492920

Please sign in to comment.