rossmacarthur / sheldon

:bowtie: Fast, configurable, shell plugin manager
https://sheldon.cli.rs
Apache License 2.0
960 stars 21 forks source link

Interrupting the `edit` command leaves a temporary file in the config directory #111

Closed rossmacarthur closed 3 years ago

rossmacarthur commented 3 years ago

To reproduce

EDITOR="code --wait" sheldon edit

Press Ctrl-C while VS Code is open.

$ ls ~/.sheldon
plugins-tmp-5232.toml
plugins.lock
plugins.toml
repos
rossmacarthur commented 3 years ago

I think we should probably just use the same temporary file and if the user tries to edit again we tell the user and ask if they want to reopen or delete it.

rossmacarthur commented 3 years ago

Fixed in https://github.com/rossmacarthur/sheldon/commit/24437c3cb00dda46c5a5bc432dc60d8498f23dc0