mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 17:44:44 +00:00
generic/setup.sh: allow clobbering env-vars file
If the option ‘noclobber’ is set in Bash, we get an error when we clobber an already existing env-vars. This is an okay error to ignore, so just >| instead. Note that >| is NOT a Bashism[[1]]. Fixes #79651 [1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_02
This commit is contained in:
parent
7b5b815c3b
commit
e0fb0df64f
@ -779,7 +779,7 @@ substituteAllInPlace() {
|
||||
# the environment used for building.
|
||||
dumpVars() {
|
||||
if [ "${noDumpEnvVars:-0}" != 1 ]; then
|
||||
export > "$NIX_BUILD_TOP/env-vars" || true
|
||||
export >| "$NIX_BUILD_TOP/env-vars" || true
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user