Skip to content

child_process.exec() fails with spaces in absolute or relative path to binary file #6803

Closed
@jorangreef

Description

@jorangreef
  • Version: v5.10.1
  • Platform: Darwin Joran.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
  • Subsystem: child_process

Using exec() to execute an absolute path to a binary, with spaces in the absolute path, e.g. /Users/Joran/test script.sh fails:

{ [Error: Command failed: /Users/Joran/test script.sh
/bin/sh: /Users/Joran/test: No such file or directory
]
  killed: false,
  code: 127,
  signal: null,
  cmd: '/Users/Joran/test script.sh' } '' '/bin/sh: /Users/Joran/test: No such file or directory\n'

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.docIssues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions