Skip to content

Commit

Permalink
refactor: fix a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
KSXGitHub committed May 15, 2024
1 parent bfd262b commit d549d78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function runCmd_ (cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb_) {
opts.log.verbose('lifecycle', logid(pkg, stage), 'stderr', data.toString())
})
process.once('SIGTERM', procKill)
process.once('SIGINT', procInterupt)
process.once('SIGINT', procInterrupt)
process.on('exit', procKill)

function procError (er) {
Expand All @@ -316,7 +316,7 @@ function runCmd_ (cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb_) {
er.pkgname = pkg.name
}
process.removeListener('SIGTERM', procKill)
process.removeListener('SIGTERM', procInterupt)
process.removeListener('SIGTERM', procInterrupt)
process.removeListener('SIGINT', procKill)
return cb(er)
}
Expand All @@ -326,7 +326,7 @@ function runCmd_ (cmd, pkg, env, wd, opts, stage, unsafe, uid, gid, cb_) {
called = true
proc.kill()
}
function procInterupt () {
function procInterrupt () {
proc.kill('SIGINT')
proc.on('exit', () => {
process.exit()
Expand Down

0 comments on commit d549d78

Please sign in to comment.