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

Interrupting download of a tool leaves the cache in a bad state #200

Closed
pzuraq opened this issue Nov 25, 2018 · 3 comments · Fixed by #498
Closed

Interrupting download of a tool leaves the cache in a bad state #200

pzuraq opened this issue Nov 25, 2018 · 3 comments · Fixed by #498
Labels

Comments

@pzuraq
Copy link

pzuraq commented Nov 25, 2018

I installed notion on a new computer yesterday and set it up to download Node v10, and it fell asleep midway through the install. The install failed, and when I went to try to rerun the command I kept getting errors.

I was able to reproduce this by sending a kill signal mid install (CTRL + C), and cleaning the cached binaries at ~/.notion fixed the issue.

@pzuraq
Copy link
Author

pzuraq commented Nov 25, 2018

#134 would likely solve this issue as well

@charlespierce
Copy link
Contributor

From discussion with @stefanpenner today, one good approach to fixing this would be to download the tools into the temp directory, and then atomically move it into the inventory directory once it has been downloaded and verified, so that if the download is interrupted we don't detect it as being available in the inventory.

@stefanpenner
Copy link
Contributor

stefanpenner commented Jun 11, 2019

@charlespierce bonus, if available checksum once complete and before moving. Node keeps it's checksums in a nice predictable place: https://nodejs.org/download/release/v12.4.0/SHASUMS256.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants