Merge pull request #108102 from matthewbauer/bash-version-check

stdenv/setup.sh: Add version check to setup script
This commit is contained in:
Sandro 2021-06-24 13:06:46 +02:00 committed by GitHub
commit d871186cdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,12 @@
set -eu
set -o pipefail
if [ -n "${BASH_VERSINFO-}" ] && [ "${BASH_VERSINFO-}" -lt 4 ]; then
echo "Detected Bash version that isn't supported by Nixpkgs (${BASH_VERSION})"
echo "Please install Bash 4 or greater to continue."
exit 1
fi
if (( "${NIX_DEBUG:-0}" >= 6 )); then
set -x
fi