Skip to content

Commit

Permalink
no-broken-symlinks: guard against double inclusions
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorBaker committed Jan 18, 2025
1 parent 238c85f commit 865fa50
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkgs/build-support/setup-hooks/no-broken-symlinks.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# shellcheck shell=bash

# Guard against double inclusion.
if (("${noBrokenSymlinksHookInstalled:-0}" > 0)); then
nixInfoLog "skipping because the hook has been propagated more than once"
return 0
fi
declare -ig noBrokenSymlinksHookInstalled=1

# symlinks are often created in postFixup
# don't use fixupOutputHooks, it is before postFixup
postFixupHooks+=(noBrokenSymlinksInAllOutputs)
Expand Down

0 comments on commit 865fa50

Please sign in to comment.