mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +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.
This commit is contained in:
parent
5862a05fb1
commit
d807a5c314
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