summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorGuillaume Maudoux <layus.on@gmail.com>2016-05-12 12:18:59 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-05-22 12:08:01 +0200
commitbfd522da633bd904918a939b29f0a0ebb594fa6b (patch)
treee74d4bf90e5b373a81f0fd1bf33a79f9aea1cfb8 /pkgs/build-support
parent70cecb9cbdc7684885e348e2e82308f8da373953 (diff)
downloadnixpkgs-bfd522da633bd904918a939b29f0a0ebb594fa6b.tar
nixpkgs-bfd522da633bd904918a939b29f0a0ebb594fa6b.tar.gz
nixpkgs-bfd522da633bd904918a939b29f0a0ebb594fa6b.tar.bz2
nixpkgs-bfd522da633bd904918a939b29f0a0ebb594fa6b.tar.lz
nixpkgs-bfd522da633bd904918a939b29f0a0ebb594fa6b.tar.xz
nixpkgs-bfd522da633bd904918a939b29f0a0ebb594fa6b.tar.zst
nixpkgs-bfd522da633bd904918a939b29f0a0ebb594fa6b.zip
setup-hooks: do not pass missing dirs to find (close #15405)
find fails when called with an inexistent search path.
That situation may arise when the output is created after by a postFixup hook.
vcunat amended the PR by clarifying one more `return` to `return 0`.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/setup-hooks/separate-debug-info.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/setup-hooks/separate-debug-info.sh b/pkgs/build-support/setup-hooks/separate-debug-info.sh
index 518be964733..c90d2cd5201 100644
--- a/pkgs/build-support/setup-hooks/separate-debug-info.sh
+++ b/pkgs/build-support/setup-hooks/separate-debug-info.sh
@@ -6,8 +6,10 @@ dontStrip=1
 fixupOutputHooks+=(_separateDebugInfo)
 
 _separateDebugInfo() {
+    [ -e "$prefix" ] || return 0
+
     local dst="${debug:-$out}"
-    if [ "$prefix" = "$dst" ]; then return; fi
+    if [ "$prefix" = "$dst" ]; then return 0; fi
 
     dst="$dst/lib/debug/.build-id"