diff --git a/lib/explore.js b/lib/explore.js index 0c9930f8e4ca7..32c93d6553ac9 100644 --- a/lib/explore.js +++ b/lib/explore.js @@ -23,14 +23,13 @@ function explore (args, cb) { var opts = {cwd: cwd, stdio: 'inherit'} var shellArgs = [] - if (args) { + if (args.length) { if (isWindows) { var execCmd = escapeExecPath(args.shift()) var execArgs = [execCmd].concat(args.map(escapeArg)) opts.windowsVerbatimArguments = true shellArgs = ['/d', '/s', '/c'].concat(execArgs) } else { - shellArgs.unshift('-c') shellArgs = ['-c', args.map(escapeArg).join(' ').trim()] } }