asdf-erlang
asdf-erlang copied to clipboard
Interrupted downloads are treated as correct downloads
Continuing with the trouble in https://github.com/asdf-vm/asdf-erlang/issues/39.
In case of interrupting the download (e.g. Ctrl-c) of an archive file with erlang source asdf does not discard the file and in case that you try again to install receive an error like
gzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now
like in https://github.com/asdf-vm/asdf-erlang/issues/68
A workaround is removing ~/.asdf/plugins/erlang/kerl-home/archives/[build] however it would be nice that in case of receiving that error you could be prompted with a message like
The source code download seems to be corrupt would you like to download it again? [Y/n]
In case that you do not have time to solve it. I could try to create a pull request with a solution.
This would be a great timesaver.
I would welcome a PR for this. I am not sure that the [Y/n] prompt is needed when the download is corrupt. If we know the download is corrupt I think it would be ok to delete it and try again without the users involvement.