Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit de51088

Browse filesBrowse 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
Copy full SHA for de51088

File tree

Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed

‎lib/explore.js

Copy file name to clipboardExpand all lines: lib/explore.js
+1-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.