1

replace /usr/bin/env sh with /bin/sh

/bin/sh exists in NixOS and in fact is the only file in `/bin`:

    $ docker run -ti --rm nixos/nix ls /bin /usr/bin
    /bin:
    sh

    /usr/bin:
    env

More context in
https://lists.sr.ht/~motiejus/bazel-zig-cc/%3CCAFVMu-pvNx%2BpeQYdge_fvmSGrHDmn78VmoYwTxkDgMjbzfVAwQ%40mail.gmail.com%3E
This commit is contained in:
Motiejus Jakštys 2022-08-30 09:19:56 +03:00
parent 342b239bb9
commit 79674a1d96
4 changed files with 7 additions and 9 deletions

View File

@ -1,6 +1,5 @@
#!/usr/bin/env bash #!/bin/sh
set -eu
set -xeuo pipefail
cd "$(git rev-parse --show-toplevel)/" cd "$(git rev-parse --show-toplevel)/"
bazel run @go_sdk//:bin/go -- mod tidy bazel run @go_sdk//:bin/go -- mod tidy

View File

@ -1,2 +1,2 @@
#!/usr/bin/env sh #!/bin/sh
exec bazel test "$@" ... exec bazel test "$@" ...

View File

@ -1,6 +1,5 @@
#!/usr/bin/env bash #!/bin/sh
set -eu
set -euo pipefail
# shellcheck disable=SC2153 # shellcheck disable=SC2153
want=$WANT want=$WANT

View File

@ -103,13 +103,13 @@ set ZIG_GLOBAL_CACHE_DIR=%ZIG_LOCAL_CACHE_DIR%
"{zig}" "{zig_tool}" %* "{zig}" "{zig_tool}" %*
""" """
_ZIG_TOOL_WRAPPER_CACHE_KNOWN = """#!/usr/bin/env sh _ZIG_TOOL_WRAPPER_CACHE_KNOWN = """#!/bin/sh
export ZIG_LOCAL_CACHE_DIR="{cache_prefix}/bazel-zig-cc" export ZIG_LOCAL_CACHE_DIR="{cache_prefix}/bazel-zig-cc"
export ZIG_GLOBAL_CACHE_DIR="{cache_prefix}/bazel-zig-cc" export ZIG_GLOBAL_CACHE_DIR="{cache_prefix}/bazel-zig-cc"
exec "{zig}" "{zig_tool}" "$@" exec "{zig}" "{zig_tool}" "$@"
""" """
_ZIG_TOOL_WRAPPER_CACHE_GUESS = """#!/usr/bin/env sh _ZIG_TOOL_WRAPPER_CACHE_GUESS = """#!/bin/sh
set -e set -e
if [ -n "$TMPDIR" ]; then if [ -n "$TMPDIR" ]; then
_cache_prefix=$TMPDIR _cache_prefix=$TMPDIR