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

Windows, envvars: envvar names may contain characters that are illegal on Linux #3077

Closed
laszlocsomor opened this issue May 30, 2017 · 2 comments
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) platform: windows type: bug

Comments

@laszlocsomor
Copy link
Contributor

Description of the problem / feature request / question:

Environment variable names may contain "(", "{", "*", "/", and who knows what else.

If they do, bootstrapping breaks in scripts/bootstrap/compile.sh when it invokes the freshly bootstrapped Bazel.

The Bazel client also happily passes such envvars to the server, which may choke on them too.

If possible, provide a minimal example to reproduce the problem:

C:\>set Foo({*/=Bar
C:\>c:\tools\msys64\msys2.exe

$ env | grep Foo
Foo({*/=Bar

$ cd /c/work/bazel-0.5.0-dist

$ ./compile.sh
(...)
🍃  Building Bazel with Bazel.
.scripts/bootstrap/compile.sh: eval: line 332: syntax error near unexpected token `('
scripts/bootstrap/compile.sh: eval: line 332: `value=$ProgramFiles(x86)'
scripts/bootstrap/compile.sh: eval: line 332: syntax error near unexpected token `('
scripts/bootstrap/compile.sh: eval: line 332: `value=$CommonProgramFiles(x86)'

Environment info

  • Operating System: Windows 10

  • Bazel version (output of bazel info release): 0.5.0

@laszlocsomor
Copy link
Contributor Author

Correction: this won't break bootstrapping if I just unset these envvars in cmd.exe, then run msys from there (so it won't inherit these envvars in the first place).

@laszlocsomor
Copy link
Contributor Author

More correction: no, bootstrapping breaks further down the road. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) platform: windows type: bug
Projects
None yet
Development

No branches or pull requests

2 participants