home-environment: fix cleanup of user replaced directories
We must only follow the symbolic link once (i.e., not use the `-e`
option) since otherwise the pattern will not match when
`home.file.xyz.source` is a directory.
(cherry picked from commit d807a5c314
)
This commit is contained in:
parent
7f2eacfe49
commit
ee28f76369
|
@ -310,7 +310,7 @@ in
|
|||
targetPath="$HOME/$relativePath"
|
||||
if [[ -e "$newGenFiles/$relativePath" ]] ; then
|
||||
$VERBOSE_ECHO "Checking $targetPath exists"
|
||||
elif [[ ! "$(readlink -e "$targetPath")" =~ "${pattern}" ]] ; then
|
||||
elif [[ ! "$(readlink "$targetPath")" =~ "${pattern}" ]] ; then
|
||||
warnEcho "Path '$targetPath' not link into Home Manager generation. Skipping delete."
|
||||
else
|
||||
echo "Checking $targetPath gone (deleting)"
|
||||
|
|
Loading…
Reference in a new issue