Skip to content

Commit

Permalink
Quote environ when injecting into crates vendor wrapper (#3078)
Browse files Browse the repository at this point in the history
Slight tweak to the logic in
#2862 (cc: @UebelAndre)

My `$PATH` variable has spaces in it and I hit an error like
```
env: Support/JetBrains/Toolbox/scripts:/Users/ryanpbrewster/.bin:/Users/ryanpbrewster/config/bin:/Users/ryanpbrewster/.local/bin:/Applications/Visual: No such file or directory                                                                     
```

If I manually modify `bazel-bin/rust/crates_vendor.sh` to modify
```
exec env - \
${_ENVIRON[@]} \
```
into
```
exec env - \
"${_ENVIRON[@]}" \
```
it starts working.
  • Loading branch information
ryanpbrewster authored Dec 10, 2024
1 parent dcf0a57 commit 4e0d0ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crate_universe/private/crates_vendor.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fi
# --default_system_javabase set to the empty string, but if you provide a path,
# it may set it to a value (eg. "/usr/local/buildtools/java/jdk11").
exec env - \\
${{_ENVIRON[@]}} \\
"${{_ENVIRON[@]}}" \\
{env} \\
"{bin}" \\
{args} \\
Expand Down

0 comments on commit 4e0d0ab

Please sign in to comment.