Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lock --reinstall deletes first and clones later #99

Closed
dead10ck opened this issue Apr 21, 2020 · 2 comments
Closed

lock --reinstall deletes first and clones later #99

dead10ck opened this issue Apr 21, 2020 · 2 comments
Labels
bug Something isn't working enhancement Internal improvements

Comments

@dead10ck
Copy link

It appears the lock --reinstall command will first delete all the existing directories, and then try to re-clone them:

https://github.com/rossmacarthur/sheldon/blob/master/src/lock.rs#L169-L176

This is unsafe, as cloning can fail, which will leave the user without any of their plugins. It should instead clone to a temporary directory, and then once everything is successful, then delete the existing directories and move the temporary ones into place.

@rossmacarthur rossmacarthur added enhancement Internal improvements bug Something isn't working labels Apr 22, 2020
rossmacarthur added a commit that referenced this issue May 1, 2020
This fixes an issue where if someone tried to reinstall they would be
left without any plugins because they would all be nuked up front prior
to trying to download them.

Resolves #99
@rossmacarthur
Copy link
Owner

Fixed in 7293cbf, this will be released in version 0.5.0 soon.

@dead10ck
Copy link
Author

dead10ck commented May 1, 2020

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement Internal improvements
Projects
None yet
Development

No branches or pull requests

2 participants