Skip to content
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

fix: use execFileSync when using a cmd with a path #178

Merged
merged 1 commit into from
Sep 11, 2020

Conversation

ckerr
Copy link
Member

@ckerr ckerr commented Sep 11, 2020

Previously execSync was used, taking the full command line as a single string. This works great for commands like git pull but not great when we specify a command's pathname that can have a space in it. For example C:\Users\My Name\e\third_party\depot_tools\gn would see C:\Users\My as the command.

NB: the new code in e-build.js is cleaner, but it wasn't clear (to me, anyway) that the changed handling of escapes would work. FWIW I tested this change on both Win and POSIX.

Xref #133 and #134

CC @codebytere @MarshallOfSound

Previously execSync was used, taking the full command line as a single
string. This would be misparsed if the path had spaces in it. For example
"C:\Users\My Name\e\third_party\depot_tools\gn" would see "C:\Users\My"
as the command.

NB: the new code in e-build.js is cleaner, but it wasn't clear (to me,
anyway) that the changed handling of escapes would work. FWIW I tested
this change on both Win and POSIX.
@ckerr ckerr merged commit f696621 into master Sep 11, 2020
@ckerr ckerr deleted the handle-spaces-in-paths-to-build-tools branch September 11, 2020 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants