From 4a9bc37a46efa06344e2f5b6dcebb2d8c932567a Mon Sep 17 00:00:00 2001 From: Aryeh Hillman Date: Fri, 17 Nov 2023 15:46:06 -0800 Subject: [PATCH] Use `/usr/bin/env` to find bash This enables `npm test` to successfully call scripts in `bin/` with the `bash` binary specified by `PROFILE`. --- Additional information: In addition to potentially preferring an alternative version of bash than the one in `/bin/bash`, some distributions forego storing bash in `bin/` at all, such as `NixOS`: ```bash $ cat /etc/os-release | rg '^NAME=' -r '' NixOS $ which bash /run/current-system/sw/bin/bash ``` --- bin/addons-linter.sh | 2 +- bin/build-addon.sh | 2 +- bin/commons.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/addons-linter.sh b/bin/addons-linter.sh index f66c02625..09161b8ac 100755 --- a/bin/addons-linter.sh +++ b/bin/addons-linter.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/env bash # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/bin/build-addon.sh b/bin/build-addon.sh index 0a367d5d0..0fed1c02b 100755 --- a/bin/build-addon.sh +++ b/bin/build-addon.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/env bash # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/bin/commons.sh b/bin/commons.sh index d8935100c..c5f52bc7c 100644 --- a/bin/commons.sh +++ b/bin/commons.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/env bash # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this