Skip to content
New issue

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

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

Already on GitHub? # to your account

Handle corrupted archive files gracefully #161

Open
arafatamim opened this issue Oct 29, 2022 · 0 comments
Open

Handle corrupted archive files gracefully #161

arafatamim opened this issue Oct 29, 2022 · 0 comments
Assignees

Comments

@arafatamim
Copy link

Often the download process fails to properly fetch the full archive, as a result the unpacking operation refuses to continue until you manually delete the corrupted archive & re-trigger the download. Here's an example:

Shell output
deno v1.20.0 is not installed. do you want to install it? (Y/n)
downloading https://dl.deno.land/release/v1.20.0/deno-x86_64-unknown-linux-gnu.zip
Version has been found
Deno v1.20.0 has been downloaded
Archive:  /home/tamim/.dvm/versions/1.20.0/deno.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /home/tamim/.dvm/versions/1.20.0/deno.zip or
        /home/tamim/.dvm/versions/1.20.0/deno.zip.zip, and cannot find /home/tamim/.dvm/versions/1.20.0/deno.zip.ZIP, period.
thread 'main' panicked at 'assertion failed: unpack_status.success()', src/commands/install.rs:179:3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

dvm should gracefully handle these cases by automatically deleting & re-downloading the release instead of just panic-quitting.

@arafatamim arafatamim changed the title Handle corrupted archive files & gracefully refetch release Handle corrupted archive files gracefully Oct 29, 2022
@justjavac justjavac self-assigned this Oct 31, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants