Set inherit_errexit after bash version check
inherit_errexit wasn’t available in bash 3. We have a check to show a nice error message, but that check is after we set inherit_errexit in setup.sh. So we can just move this to below the BASH_VERSINFO check.
This commit is contained in:
parent
7efd61a09a
commit
ec4019f6dc
1 changed files with 2 additions and 1 deletions
|
@ -2,7 +2,6 @@
|
||||||
__nixpkgs_setup_set_original=$-
|
__nixpkgs_setup_set_original=$-
|
||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
shopt -s inherit_errexit
|
|
||||||
|
|
||||||
if [[ -n "${BASH_VERSINFO-}" && "${BASH_VERSINFO-}" -lt 4 ]]; then
|
if [[ -n "${BASH_VERSINFO-}" && "${BASH_VERSINFO-}" -lt 4 ]]; then
|
||||||
echo "Detected Bash version that isn't supported by Nixpkgs (${BASH_VERSION})"
|
echo "Detected Bash version that isn't supported by Nixpkgs (${BASH_VERSION})"
|
||||||
|
@ -10,6 +9,8 @@ if [[ -n "${BASH_VERSINFO-}" && "${BASH_VERSINFO-}" -lt 4 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
shopt -s inherit_errexit
|
||||||
|
|
||||||
if (( "${NIX_DEBUG:-0}" >= 6 )); then
|
if (( "${NIX_DEBUG:-0}" >= 6 )); then
|
||||||
set -x
|
set -x
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue