From 11a08bcfad2523aa94a3cf54abce5894e78feaca Mon Sep 17 00:00:00 2001 From: DavHau Date: Thu, 22 Oct 2020 10:15:42 +0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: symphorien Co-authored-by: Sandro --- pkgs/build-support/setup-hooks/auto-patchelf.sh | 4 ++-- 1 file 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 7df454f4f01..a48071e24eb 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