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}
# Note: sadly, $configureScript detection comes later in configurePhase,
# and reordering would cause more trouble than worth.
if [ -z "$shareDocName" ]; then
local confScript="$configureScript"
if [ -z "${shareDocName:-}" ]; then
local confScript="${configureScript:-}"
if [ -z "$confScript" ] && [ -x ./configure ]; then
confScript=./configure
fi

View file

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

View file

@ -1216,7 +1216,7 @@ fixLibtool() {
done
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=.*^^'
}