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: node executables not running on windows if bash toolchain path contains whitespace #1104

Conversation

devversion
Copy link
Contributor

The windows launcher code does currently break if the path to the bash
binary contains a whitespace.

This is common on windows where programs are stored under
C:\Program Files.

e.g.

:run
C:/Program Files/msys2/usr/bin/bash.exe -c "!run_script!"

The path needs to be quoted so that it won't be incorrectly picked up as
two separate commands. Resulting in an
exception like:

'C:/Program' is not recognized as an internal or external command,
operable program or batch file.

contains whitespace.

The windows launcher code does currently break if the path to the bash
binary contains a whitespace.

This is common on windows where programs are stored under
`C:\Program Files`.

e.g.

```
:run
C:/Program Files/msys2/usr/bin/bash.exe -c "!run_script!"
```

The path needs to be quoted so that it won't be incorrectly picked up as
two separate commands. Resulting in an
exception like:

```
'C:/Program' is not recognized as an internal or external command,
operable program or batch file.
```
Copy link
Collaborator

@gregmagolan gregmagolan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexeagle alexeagle merged commit c82b43d into bazel-contrib:master Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants