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

[cli] spawn error when node path includes space on Windows #9384

Closed
atrick-speedline opened this issue Aug 1, 2020 · 3 comments
Closed

[cli] spawn error when node path includes space on Windows #9384

atrick-speedline opened this issue Aug 1, 2020 · 3 comments
Labels
bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 package/tools Related to AWS CDK Tools or CLI
Milestone

Comments

@atrick-speedline
Copy link

Windows users commonly install node in the "Program Files" directory. Using WSL, this works fine (even if the path to node has a space), but using Git Bash or cmd.exe, you get the an error when running cdk synth (see below).

Reproduction Steps

Make a basic cdk app, make sure node is in "Program Files", run cdk synth --app path/to/app.js.

Error Log

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Subprocess exited with error 1

Environment

  • CLI Version : Git Bash
  • Framework Version: 1.54.0
  • Node.js Version: v12.18.0
  • OS : Windows 10
  • Language (Version): TypeScript (3.9.6)

Other

Removing the shell argument in the call to childProcess.spawn in aws-cdk/lib/api/cxapp/exec.ts fixes the issue.


This is 🐛 Bug Report

@atrick-speedline atrick-speedline added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 1, 2020
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Aug 1, 2020
@atrick-speedline
Copy link
Author

By the way, I'm not entirely sure this is a bug with aws-cdk. After reading the documentation for child_process.spawn, it's entirely unclear to me how, or if, the shell argument is supposed to effect escaping.

@shivlaks shivlaks added the p1 label Aug 4, 2020
@shivlaks
Copy link
Contributor

shivlaks commented Aug 4, 2020

@atrick-speedline I'm also not sure if this is a bug yet

Since there is a workaround, I think we should mark it as a p2 for now and investigate further.
Thanks for creating this issue and for the workaround, it might help someone else who runs into the same friction.

@shivlaks shivlaks added p2 and removed p1 labels Aug 4, 2020
@SomayaB SomayaB removed the needs-triage This issue or PR still needs to be triaged. label Aug 4, 2020
@rix0rrr rix0rrr added this to the [CLI] Soon milestone Aug 13, 2020
@shivlaks shivlaks added the effort/medium Medium work item – several days of effort label Aug 31, 2020
@NGL321 NGL321 assigned rix0rrr and unassigned shivlaks Jan 25, 2021
@rix0rrr rix0rrr removed their assignment Jun 3, 2021
@github-actions
Copy link

github-actions bot commented Jun 3, 2022

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 3, 2022
@github-actions github-actions bot closed this as completed Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

4 participants