Sitelet https://github.com/moxystudio/node-cross-spawn/issues/77
Skip to content

Commands with spaces fail with shell: true #77

Description

@imgx64

Commands with spaces fail with shell: true, but work if it's false. node developers say fixing this from their side would break other things: nodejs/node#7367 . Should this be fixed in cross-spawn? What do you think?

> require('cross-spawn').spawn('C:\\Program Files\\nodejs\\node.exe', [], {shell:true})
undefined
> Error: spawn C:\Program Files\nodejs\node.exe ENOENT
    at notFoundError (C:\Users\redacted\node_modules\cross-spawn\lib\enoent.js:11:11)
    at verifyENOENT (C:\Users\redacted\node_modules\cross-spawn\lib\enoent.js:46:16)
    at ChildProcess.cp.emit (C:\Users\redacted\node_modules\cross-spawn\lib\enoent.js:33:19)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
> require('cross-spawn').spawn('C:\\Program Files\\nodejs\\node.exe', [], {shell:false})
ChildProcess {
...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions