stdenv: Fix possible issues discovered with

```
set -o errexit -o nounset -o pipefail
shopt -s inherit_errexit
```

in `stdenv/default-builder.sh`
This commit is contained in:
Artturin 2023-07-28 17:30:50 +03:00
parent 9816ca55c2
commit 1db1e3c467
3 changed files with 4 additions and 4 deletions

View File

@ -69,8 +69,8 @@ _multioutConfig() {
# try to detect share/doc/${shareDocName} # try to detect share/doc/${shareDocName}
# Note: sadly, $configureScript detection comes later in configurePhase, # Note: sadly, $configureScript detection comes later in configurePhase,
# and reordering would cause more trouble than worth. # and reordering would cause more trouble than worth.
if [ -z "$shareDocName" ]; then if [ -z "${shareDocName:-}" ]; then
local confScript="$configureScript" local confScript="${configureScript:-}"
if [ -z "$confScript" ] && [ -x ./configure ]; then if [ -z "$confScript" ] && [ -x ./configure ]; then
confScript=./configure confScript=./configure
fi fi

View File

@ -53,7 +53,7 @@ patchShebangs() {
read -r oldInterpreterLine < "$f" read -r oldInterpreterLine < "$f"
read -r oldPath arg0 args <<< "${oldInterpreterLine:2}" read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"
if [[ -z "$pathName" ]]; then if [[ -z "${pathName:-}" ]]; then
if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then
pathName=HOST_PATH pathName=HOST_PATH
else else

View File

@ -1216,7 +1216,7 @@ fixLibtool() {
done done
sed -i "$1" \ sed -i "$1" \
-e "s^eval \(sys_lib_search_path=\).*^\1'$search_path'^" \ -e "s^eval \(sys_lib_search_path=\).*^\1'${search_path:-}'^" \
-e 's^eval sys_lib_.+search_path=.*^^' -e 's^eval sys_lib_.+search_path=.*^^'
} }