SuperCuber / dotter

A dotfile manager and templater written in rust 🦀
The Unlicense
882 stars 46 forks source link

[BUG] Dotter depends on configuration too much when undeploying #55

Open SuperCuber opened 3 years ago

SuperCuber commented 3 years ago

Reproduction

Expected behavior

b should be deleted

Actual behavior

[ERROR] Failed to undeploy
Caused by:
    get a configuration
    expand files that are directories
    expand file "a"
    read file's metadata
    The system cannot find the file specified. (os error 2)
poperigby commented 3 years ago

I think I'm running into this issue. I deleted a directory in the dotter repo, and now it's giving me a bunch of these errors:

[ERROR] Failed to delete symlink "ranger/plugins/devicons2/screenshot.png" -> "/home/cassidy/.config/ranger/plugins/devicons2/screenshot.png"
Caused by:
    detect symlink's current state
    get real path of source
    No such file or directory (os error 2)
Diomendius commented 3 years ago

I've opened a PR which should fix your issue, @lumbo7332. It doesn't quite tackle the core problem of this issue, which seems to be that Dotter config entries which point to nonexistent files cause hard errors rather than warnings, but if you delete a file or directory and remove the corresponding config entries, Dotter should no longer crash because the still-existing symlinks are broken.

CanRau commented 9 months ago

I think this could be closed as #87 has been merged, correct?

SuperCuber commented 8 months ago

@CanRau IIRC the fix only works for one of the platforms. I need to revisit this 🙃