mirror of
https://github.com/nix-community/home-manager
synced 2024-11-24 03:59:46 +01:00
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
1 changed files with 1 additions and 1 deletions
|
@ -310,7 +310,7 @@ in
|
||||||
targetPath="$HOME/$relativePath"
|
targetPath="$HOME/$relativePath"
|
||||||
if [[ -e "$newGenFiles/$relativePath" ]] ; then
|
if [[ -e "$newGenFiles/$relativePath" ]] ; then
|
||||||
$VERBOSE_ECHO "Checking $targetPath exists"
|
$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."
|
warnEcho "Path '$targetPath' not link into Home Manager generation. Skipping delete."
|
||||||
else
|
else
|
||||||
echo "Checking $targetPath gone (deleting)"
|
echo "Checking $targetPath gone (deleting)"
|
||||||
|
|
Loading…
Reference in a new issue