From 22e28ff9c6620268567f4420bdb6c40c14255757 Mon Sep 17 00:00:00 2001 From: Jan Kaifer Date: Fri, 17 Feb 2023 10:45:42 +0100 Subject: [PATCH] Make shebangs portable used in the repo portable (#46028) Not all systems have `/bin/bash` (for example NixOS). `/usr/bin/env bash` reads the location of bash from `PATH` ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) --- .github/actions/next-stats-action/entrypoint.sh | 2 +- scripts/check-examples.sh | 2 +- scripts/check-pre-compiled.sh | 2 +- scripts/next-with-deps.sh | 2 +- scripts/release-stats.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/next-stats-action/entrypoint.sh b/.github/actions/next-stats-action/entrypoint.sh index 5f5c38de22..e59f0f7672 100755 --- a/.github/actions/next-stats-action/entrypoint.sh +++ b/.github/actions/next-stats-action/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eu # stop on error export HOME=/root diff --git a/scripts/check-examples.sh b/scripts/check-examples.sh index 4165527d19..38f908df28 100755 --- a/scripts/check-examples.sh +++ b/scripts/check-examples.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash for folder in examples/* ; do if [ -f "$folder/package.json" ]; then diff --git a/scripts/check-pre-compiled.sh b/scripts/check-pre-compiled.sh index 3e8a7042a1..b789aae388 100755 --- a/scripts/check-pre-compiled.sh +++ b/scripts/check-pre-compiled.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/scripts/next-with-deps.sh b/scripts/next-with-deps.sh index 2fd6b5cfc4..2e59f86be7 100755 --- a/scripts/next-with-deps.sh +++ b/scripts/next-with-deps.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash START_DIR=$PWD # gets last argument which should be the project dir diff --git a/scripts/release-stats.sh b/scripts/release-stats.sh index a926b4eed2..562fa8fd58 100755 --- a/scripts/release-stats.sh +++ b/scripts/release-stats.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ $(node ./scripts/check-is-release.js 2> /dev/null || :) = v* ]]; then