cargo-download
cargo-download copied to clipboard
cargo-download stdout output is truncated for some crates
I'm not sure why this happens, but it reproduces every time for me:
$ wget -O file1 https://crates.io/api/v1/crates/semver/1.0.4/download
$ cargo download semver=1.0.4 >file2
$ ls -l file?
-rw-rw-r-- 1 eric eric 29375 Jul 30 10:38 file1
-rw-rw-r-- 1 eric eric 29362 Oct 1 20:54 file2
The output from cargo download
is truncated by a few bytes, and tar
throws errors when trying to extract it.
If I instead run cargo download -o file3 semver=1.0.4
I get the correct file contents.
I guess once I stared at the source code, the problem was obvious, and is fixed (at least for me) by #11.
There's a lot of warnings thrown off by the code on a current Rust toolchain, but it doesn't look like this code is currently maintained. Would you consider letting someone else take over maintaining this crate?
@Xion it would be cool to give maintenance over if @ericseppanen is still interested