setup-hooks/make-symlinks-relative.sh: match what other hooks do so

the hook doesn't output the following if $prefix doesn't exist

find: '/nix/store/...': No such file or directory

some other hooks that do this: prune-libtool-files.sh, audit-tmpdir.sh separate-debug-info.sh
This commit is contained in:
Artturin 2023-01-06 02:35:37 +02:00
parent 314b03125f
commit ba11c6f123

View File

@ -6,8 +6,8 @@ postFixupHooks+=(_makeSymlinksRelative)
_makeSymlinksRelative() { _makeSymlinksRelative() {
local symlinkTarget local symlinkTarget
if [ -n "${dontRewriteSymlinks-}" ]; then if [ "${dontRewriteSymlinks-}" ] || [ ! -e "$prefix" ]; then
return 0 return
fi fi
while IFS= read -r -d $'\0' f; do while IFS= read -r -d $'\0' f; do