Skip to content

Commit

Permalink
fix var quoting in cc
Browse files Browse the repository at this point in the history
closes #289
  • Loading branch information
jhheider authored and mxcl committed Jan 25, 2024
1 parent f48457d commit 60adba0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions share/toolchain/shim
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

tool=$(basename $0)
tool=$(basename "$0")

if [ $(uname) != Darwin ]; then
if [ "$(uname)" != Darwin ]; then
if [ -x /usr/local/bin/pkgx ]; then
# removed from PATH deliberately
#TODO like, probs we should set PKGX or something before removing it from PATH
Expand All @@ -22,7 +22,7 @@ if [ $(uname) != Darwin ]; then

filtered_args=()
for arg in "$@"; do
if [ $arg != -Werror ]; then
if [ "$arg" != -Werror ]; then
filtered_args+=("$arg")
fi
done
Expand All @@ -41,10 +41,10 @@ ld|lld|lld-link|ld64.lld)
fi
done

exec /usr/bin/$tool "$@" -rpath "${PKGX_DIR:-$HOME/.pkgx}"
exec /usr/bin/"$tool" "$@" -rpath "${PKGX_DIR:-$HOME/.pkgx}"
;;
*)
exec /usr/bin/$tool "$@"
exec /usr/bin/"$tool" "$@"
;;
esac

Expand Down

0 comments on commit 60adba0

Please sign in to comment.