Skip to content

escaping paths on windows #1

@max-mapper

Description

@max-mapper

when I run this on windows:

var spawn = require('execspawn')
spawn(process.execPath + ' -v')

I get this on stderr:

'C:\Program' is not recognized as an internal or external command.

but if I wrap the execPath in quotes, like this:

spawn('"' + process.execPath + '" -v')

then it works.

In the interest of making portable code easier to write, is this something that execspawn should/could try and handle for me or is it outside of scope?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions