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.
|
# the environment used for building.
|
||||||
dumpVars() {
|
dumpVars() {
|
||||||
if [ "${noDumpEnvVars:-0}" != 1 ]; then
|
if [ "${noDumpEnvVars:-0}" != 1 ]; then
|
||||||
export > "$NIX_BUILD_TOP/env-vars" || true
|
export >| "$NIX_BUILD_TOP/env-vars" || true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user