Comparing version 3.1.1 to 3.1.2
@@ -36,2 +36,11 @@ 'use strict'; | ||
}); | ||
process.on('SIGINT', function () { | ||
return proc.kill('SIGINT'); | ||
}); | ||
process.on('SIGBREAK', function () { | ||
return proc.kill('SIGBREAK'); | ||
}); | ||
process.on('SIGHUP', function () { | ||
return proc.kill('SIGHUP'); | ||
}); | ||
proc.on('exit', process.exit); | ||
@@ -38,0 +47,0 @@ return { |
{ | ||
"name": "cross-env", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "Run commands that set environment variables across platforms", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -12,2 +12,5 @@ import {spawn} from 'cross-spawn'; | ||
process.on('SIGTERM', () => proc.kill('SIGTERM')); | ||
process.on('SIGINT', () => proc.kill('SIGINT')); | ||
process.on('SIGBREAK', () => proc.kill('SIGBREAK')); | ||
process.on('SIGHUP', () => proc.kill('SIGHUP')); | ||
proc.on('exit', process.exit); | ||
@@ -14,0 +17,0 @@ return proc; |
@@ -74,3 +74,3 @@ import chai from 'chai'; | ||
it(`should propage SIGTERM signal`, () => { | ||
it(`should propagate kill signals`, () => { | ||
testEnvSetting({ | ||
@@ -81,3 +81,9 @@ FOO_ENV: 'foo=bar' | ||
process.emit('SIGTERM'); | ||
process.emit('SIGINT'); | ||
process.emit('SIGHUP'); | ||
process.emit('SIGBREAK'); | ||
expect(spawned.kill).to.have.been.calledWith('SIGTERM'); | ||
expect(spawned.kill).to.have.been.calledWith('SIGINT'); | ||
expect(spawned.kill).to.have.been.calledWith('SIGHUP'); | ||
expect(spawned.kill).to.have.been.calledWith('SIGBREAK'); | ||
}); | ||
@@ -84,0 +90,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17579
274