Comparing version 1.0.1 to 1.0.2
@@ -13,3 +13,3 @@ 'use strict'; | ||
var _child_process = require('child_process'); | ||
var _crossSpawn = require('cross-spawn'); | ||
@@ -34,3 +34,3 @@ var _addToPathDistGetPathVar = require('add-to-path/dist/get-path-var'); | ||
if (command) { | ||
return (0, _child_process.spawn)(command, commandArgs, { stdio: 'inherit', env: env }); | ||
return (0, _crossSpawn.spawn)(command, commandArgs, { stdio: 'inherit', env: env }); | ||
} | ||
@@ -37,0 +37,0 @@ } |
{ | ||
"name": "cross-env", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Run commands that set environment variables across platforms", | ||
@@ -42,2 +42,3 @@ "main": "src/index.js", | ||
"commitizen": "1.0.5", | ||
"cross-spawn": "2.0.0", | ||
"cz-conventional-changelog": "1.1.2", | ||
@@ -44,0 +45,0 @@ "eslint": "1.5.1", |
@@ -1,2 +0,2 @@ | ||
import {spawn} from 'child_process'; | ||
import {spawn} from 'cross-spawn'; | ||
import getPathVar from 'add-to-path/dist/get-path-var'; | ||
@@ -3,0 +3,0 @@ export default crossEnv; |
@@ -10,3 +10,3 @@ import chai from 'chai'; | ||
const proxied = { | ||
child_process: { // eslint-disable-line camelcase | ||
'cross-spawn': { | ||
spawn: sinon.spy(() => 'spawn-returned') | ||
@@ -21,3 +21,3 @@ } | ||
beforeEach(() => { | ||
proxied.child_process.spawn.reset(); | ||
proxied['cross-spawn'].spawn.reset(); | ||
}); | ||
@@ -35,3 +35,3 @@ | ||
crossEnv([]); | ||
expect(proxied.child_process.spawn).to.have.not.been.called; | ||
expect(proxied['cross-spawn'].spawn).to.have.not.been.called; | ||
}); | ||
@@ -48,4 +48,4 @@ | ||
expect(ret, 'returns what spawn returns').to.equal('spawn-returned'); | ||
expect(proxied.child_process.spawn).to.have.been.calledOnce; | ||
expect(proxied.child_process.spawn).to.have.been.calledWith( | ||
expect(proxied['cross-spawn'].spawn).to.have.been.calledOnce; | ||
expect(proxied['cross-spawn'].spawn).to.have.been.calledWith( | ||
'echo', ['hello world'], {stdio: 'inherit', env} | ||
@@ -52,0 +52,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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
0
11834
19