Skip to content

Commit 820b613

Browse files
committed
chore(update-{deprecated-links,test-cmd-list},runLint): update shebang
The test scripts have had the shebang #!/bin/bash, but Bash is not necessarily located at /bin/bash. For example, it does not located there in FreeBSD and MINIX. As we require /bin/bash in the shebang of the pre-commit scripts, any attempts to commit changes in such a system would be blocked by the pre-commit hook. In this patch, we update the shebang to `#!/usr/bin/env bash`, which is a widely used workaround for this issue. Note: I have not changed the shebang of `test/docker/*/install-packages.sh` as these seem to be always called in a GNU/Linux container, where /bin/bash exists.
1 parent 27049da commit 820b613

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

test/deprecated/update-deprecated-links

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
is_tracked_by_git()

test/runLint

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/bin/bash -u
1+
#!/usr/bin/env bash
2+
set -u
23

34
gitgrep()
45
{

test/update-test-cmd-list

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/bin/bash -eu
1+
#!/usr/bin/env bash
2+
set -eu
23

34
mydir=$(
45
cd "$(dirname "$0")"

0 commit comments

Comments
 (0)