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

win: Node.js command prompt fails to set PATH with unescaped & in it #4802

Closed
jvilk opened this issue Jan 21, 2016 · 2 comments
Closed

win: Node.js command prompt fails to set PATH with unescaped & in it #4802

jvilk opened this issue Jan 21, 2016 · 2 comments
Labels
windows Issues and PRs related to the Windows platform.

Comments

@jvilk
Copy link

jvilk commented Jan 21, 2016

Given a PATH on Windows with the following directory entry:

...;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.4 & MySQL Utilities 1.5.4 1.5\Doctrine extensions for PHP\;...

... Node.js Command Prompt will echo the error:

'MySQL' is not recognized as an external or internal command, operable program or batch file.

Windows Command Prompt parses this path just fine.

Now, a permanent solution (for the user) would be to change the PATH to use quotations around this directory... but I'd argue that paths like these may be more common "in the wild" than we think. It would be ideal to nip it in the bud with a robust solution that mirrors the vanilla Command Prompt's behavior, but I'm not sure if one exists.

@mscdex mscdex added the windows Issues and PRs related to the Windows platform. label Jan 21, 2016
mscdex added a commit to mscdex/io.js that referenced this issue Jan 21, 2016
This commit fixes an issue with the Node.js command prompt
on Windows where the PATH environment variable would not be
set correctly if the existing PATH contained an '&'.

Fixes: nodejs#4802
@mscdex
Copy link
Contributor

mscdex commented Jan 21, 2016

#4804 should fix this.

@jvilk
Copy link
Author

jvilk commented Jan 21, 2016

That was fast! I didn't think about quoting the entire thing.

Thanks.

@mscdex mscdex closed this as completed in 922d538 Jan 23, 2016
rvagg pushed a commit that referenced this issue Jan 25, 2016
This commit fixes an issue with the Node.js command prompt
on Windows where the PATH environment variable would not be
set correctly if the existing PATH contained an '&'.

Fixes: #4802
PR-URL: #4804
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this issue Feb 17, 2016
This commit fixes an issue with the Node.js command prompt
on Windows where the PATH environment variable would not be
set correctly if the existing PATH contained an '&'.

Fixes: #4802
PR-URL: #4804
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this issue Feb 18, 2016
This commit fixes an issue with the Node.js command prompt
on Windows where the PATH environment variable would not be
set correctly if the existing PATH contained an '&'.

Fixes: #4802
PR-URL: #4804
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this issue Mar 2, 2016
This commit fixes an issue with the Node.js command prompt
on Windows where the PATH environment variable would not be
set correctly if the existing PATH contained an '&'.

Fixes: #4802
PR-URL: #4804
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
scovetta pushed a commit to scovetta/node that referenced this issue Apr 2, 2016
This commit fixes an issue with the Node.js command prompt
on Windows where the PATH environment variable would not be
set correctly if the existing PATH contained an '&'.

Fixes: nodejs#4802
PR-URL: nodejs#4804
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants