noBrokenSymlinks: fix tests on Linux

`mkUnreadableSymlink` was exiting before the hook could print its
messages, meaning that the combined 'broken' test wasn't getting the
symlink counts.
This commit is contained in:
Rhys-T
2025-03-05 15:46:37 -05:00
parent 1a9fd7866b
commit 43178a462f
+4 -1
View File
@@ -29,7 +29,10 @@ let
)
if readlink "$out/unreadable-symlink" >/dev/null 2>&1; then
nixErrorLog "symlink permissions not supported"
${optionalString failIfUnsupported "exit 1"}
${optionalString failIfUnsupported
# Postpone the failure until after no-broken-symlinks.sh has a chance to print its messages
"postFixupHooks+=('exit 1')"
}
fi
'';