about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorDavHau <hsngrmpf+github@gmail.com>2020-10-22 10:15:42 +0700
committerGitHub <noreply@github.com>2020-10-22 10:15:42 +0700
commit11a08bcfad2523aa94a3cf54abce5894e78feaca (patch)
treed89eb19491361591c6da2e619053f689a56fe994 /pkgs/build-support
parent5c382b7f0e4705f447ac554dcfc7069849766710 (diff)
downloadnixlib-11a08bcfad2523aa94a3cf54abce5894e78feaca.tar
nixlib-11a08bcfad2523aa94a3cf54abce5894e78feaca.tar.gz
nixlib-11a08bcfad2523aa94a3cf54abce5894e78feaca.tar.bz2
nixlib-11a08bcfad2523aa94a3cf54abce5894e78feaca.tar.lz
nixlib-11a08bcfad2523aa94a3cf54abce5894e78feaca.tar.xz
nixlib-11a08bcfad2523aa94a3cf54abce5894e78feaca.tar.zst
nixlib-11a08bcfad2523aa94a3cf54abce5894e78feaca.zip
Apply suggestions from code review
Co-authored-by: symphorien <symphorien@users.noreply.github.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/setup-hooks/auto-patchelf.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.sh b/pkgs/build-support/setup-hooks/auto-patchelf.sh
index 7df454f4f017..a48071e24ebc 100644
--- a/pkgs/build-support/setup-hooks/auto-patchelf.sh
+++ b/pkgs/build-support/setup-hooks/auto-patchelf.sh
@@ -8,7 +8,7 @@ gatherLibraries() {
 # wrapper around patchelf to raise proper error messages
 # containing the tried file name and command
 runPatchelf() {
-  patchelf $@ || (echo "Command failed: patchelf $@" && exit 1)
+  patchelf "$@" || (echo "Command failed: patchelf $*" && exit 1)
 }
 
 addEnvHooks "$targetOffset" gatherLibraries
@@ -231,7 +231,7 @@ autoPatchelf() {
       echo "autoPatchelfHook could not satisfy dependency $failedDep"
       depsMissing=1
     done
-    if [ $depsMissing == 1 -a -z "$autoPatchelfIgnoreMissingDeps" ]; then
+    if [[ $depsMissing == 1 && -z "$autoPatchelfIgnoreMissingDeps" ]]; then
       echo "Add the missing dependencies to the build inputs or set autoPatchelfIgnoreMissingDeps=true"
       exit 1
     fi