-
-
Notifications
You must be signed in to change notification settings - Fork 236
Add execa.command()
#261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add execa.command()
#261
Conversation
I think this should be documented somewhere that Weird behavior I see while testing: |
Good point! Fixed. |
I confirm that there's a bug with path with more than one spaces: execa("path/with/one\\ space"); // Success
execa("path/with/more \\than\\ one\\ space"); // Fail This is due to |
This is a different bug. I've opened a PR at #262 to fix it. |
execa.command()
and execa.command.sync()
execa.command()
and execa.command.sync()
execa.command()
0049816
to
87f4a73
Compare
This reverts commit 5fe062d.
Done. I've separated the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-Authored-By: Sindre Sorhus <[email protected]>
Co-Authored-By: Sindre Sorhus <[email protected]>
Fixed! |
Fixed. |
This PR is a follow-up on #182 which allowed specifying the command and its arguments as a single string.
It improves the common case where the program contains a space in its path. For example on Windows
C:\Program Files\node\node.exe
.With
execa(command, [array], [options])
, when:command
contains a spacearray
is definedoptions.shell
is nottrue
Then:
command
is handled as a command with a space in its path.I've fixed the tests. No changes need to be done to the
README
since it already implies that no spaces escaping is needed for programs containing a space in their path.