Skip to content

Commit b89765c

Browse files
authored
feat: replace /bin/bash with /usr/bin/env bash (#3087)
This allows system which don't have this location (looking at you NixOS) to run the scripts.
1 parent 9555ba8 commit b89765c

File tree

10 files changed

+10
-9
lines changed

10 files changed

+10
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ END_UNRELEASED_TEMPLATE
7070
* (gazelle) Switched back to smacker/go-tree-sitter, fixing
7171
[#2630](https://github.com/bazel-contrib/rules_python/issues/2630)
7272
* (ci) We are now testing on Ubuntu 22.04 for RBE and non-RBE configurations.
73+
* (core) #!/usr/bin/env bash is now used as a shebang in the stage1 bootstrap template.
7374

7475
{#v0-0-0-fixed}
7576
### Fixed

addlicense.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Copyright 2023 The Bazel Authors. All rights reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");

docs/readthedocs_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -eou pipefail
44

python/private/interpreter_tmpl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# --- begin runfiles.bash initialization v3 ---
44
# Copy-pasted from the Bazel Bash runfiles library v3.

python/private/print_toolchain_checksums.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def print_toolchains_checksums(name):
2727

2828
template = """\
2929
cat > "$@" <<'EOF'
30-
#!/bin/bash
30+
#!/usr/bin/env bash
3131
set -euo pipefail
3232
3333
set -o errexit -o nounset -o pipefail

python/private/stage1_bootstrap_template.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e
44

python/uv/private/lock.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -euo pipefail
33

44
if [[ -n "${BUILD_WORKSPACE_DIRECTORY:-}" ]]; then

sphinxdocs/private/sphinx_run_template.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
declare -a args
44
%SETUP_ARGS%

tests/bootstrap_impls/external_binary_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -euxo pipefail
33

44
tmpdir="${TEST_TMPDIR}/external_binary"

tests/integration/bazel_from_env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# A simple wrapper so rules_bazel_integration_test can use the
44
# bazel version inherited from the environment.

0 commit comments

Comments
 (0)