From ba11c6f123afdf19681de27b433ae25b0f2b95f1 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 6 Jan 2023 02:35:37 +0200 Subject: [PATCH] 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 --- pkgs/build-support/setup-hooks/make-symlinks-relative.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/setup-hooks/make-symlinks-relative.sh b/pkgs/build-support/setup-hooks/make-symlinks-relative.sh index cd9c2eaa2d80..f34353a7617b 100644 --- a/pkgs/build-support/setup-hooks/make-symlinks-relative.sh +++ b/pkgs/build-support/setup-hooks/make-symlinks-relative.sh @@ -6,8 +6,8 @@ postFixupHooks+=(_makeSymlinksRelative) _makeSymlinksRelative() { local symlinkTarget - if [ -n "${dontRewriteSymlinks-}" ]; then - return 0 + if [ "${dontRewriteSymlinks-}" ] || [ ! -e "$prefix" ]; then + return fi while IFS= read -r -d $'\0' f; do