no-broken-symlinks: exit instead of returning 1 for cleaner log

This commit is contained in:
Connor Baker
2025-01-21 13:40:32 -08:00
parent 9b9badd957
commit ba1297b0d3

View File

@@ -47,7 +47,7 @@ noBrokenSymlinks() {
# If it does, Nix probably won't be able to resolve or track dependencies. # If it does, Nix probably won't be able to resolve or track dependencies.
if [[ $symlinkTarget != "$output" && $symlinkTarget != "$output"/* ]]; then if [[ $symlinkTarget != "$output" && $symlinkTarget != "$output"/* ]]; then
nixErrorLog "symlink $path points to target $symlinkTarget, which escapes the current store path $output" nixErrorLog "symlink $path points to target $symlinkTarget, which escapes the current store path $output"
return 1 exit 1
fi fi
fi fi
@@ -79,7 +79,7 @@ noBrokenSymlinks() {
if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0)); then if ((numDanglingSymlinks > 0 || numReflexiveSymlinks > 0)); then
nixErrorLog "found $numDanglingSymlinks dangling symlinks and $numReflexiveSymlinks reflexive symlinks" nixErrorLog "found $numDanglingSymlinks dangling symlinks and $numReflexiveSymlinks reflexive symlinks"
return 1 exit 1
fi fi
return 0 return 0
} }