diff options
author | Guillaume Maudoux <layus.on@gmail.com> | 2016-05-12 12:18:59 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-05-22 12:08:01 +0200 |
commit | bfd522da633bd904918a939b29f0a0ebb594fa6b (patch) | |
tree | e74d4bf90e5b373a81f0fd1bf33a79f9aea1cfb8 /pkgs/build-support/setup-hooks/separate-debug-info.sh | |
parent | 70cecb9cbdc7684885e348e2e82308f8da373953 (diff) |
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/setup-hooks/separate-debug-info.sh')
-rw-r--r-- | pkgs/build-support/setup-hooks/separate-debug-info.sh | 4 |
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 518be96473342..c90d2cd520136 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" |