Skip to content

Commit de51088

Browse files
jasiskclaudiahdz
authored andcommitted
fix: npm explore spawn shell correctly
PR-URL: #784 Credit: @jasisk Close: #784 Reviewed-by: @claudiahdz
1 parent 8e1869e commit de51088

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/explore.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ function explore (args, cb) {
2323
var opts = {cwd: cwd, stdio: 'inherit'}
2424

2525
var shellArgs = []
26-
if (args) {
26+
if (args.length) {
2727
if (isWindows) {
2828
var execCmd = escapeExecPath(args.shift())
2929
var execArgs = [execCmd].concat(args.map(escapeArg))
3030
opts.windowsVerbatimArguments = true
3131
shellArgs = ['/d', '/s', '/c'].concat(execArgs)
3232
} else {
33-
shellArgs.unshift('-c')
3433
shellArgs = ['-c', args.map(escapeArg).join(' ').trim()]
3534
}
3635
}

0 commit comments

Comments
 (0)