1
Fork 0

Fix stow.py not deleting broken symlinks

This commit is contained in:
Hadeed 2023-08-22 17:49:12 +05:00
parent da119d8b51
commit 82dc5bedbc
2 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ def stow(pkg, stow_dir):
source = os.path.join(root, file) source = os.path.join(root, file)
target = os.path.join(symlink_dir, re.sub("^dot-", ".", file)) target = os.path.join(symlink_dir, re.sub("^dot-", ".", file))
if os.path.exists(target): if os.path.isfile(target) or os.path.islink(target):
os.remove(target) os.remove(target)
os.symlink(source, target) os.symlink(source, target)

View file

@ -1,7 +1,7 @@
typeset -U path typeset -U path
path+="$HOME/bin" path+="$HOME/bin"
export DOTS="$HOME/repos/dots" export DOTS="$HOME/docs/repos/dots"
export VISUAL="nvim" export VISUAL="nvim"
export EDITOR="nvim" export EDITOR="nvim"