When extracting cbindgen-0.24.3-x86_64-apple-darwin.tar.gz using the following equivalent code:
use flate2::read::GzDecoder;
use tar::Archive;
let tar = GzDecoder::new(dat);
Archive::new(tar).unpack(path)?;
where dat is some readable that is pipelined from the downloading stage, I got:
/var/folders/4h/3pck4_r16tn6960znvv4w0nw0000gn/T/.tmp7GLCIo/bin-cbindgen
└── GNUSparseFile.0
└── cbindgen
1 directory, 1 file
Using file cbindgen shows that it is just data, does not have executable set and cannot be executed after chmod +x cbindgen.
While it should be:
/var/folders/4h/3pck4_r16tn6960znvv4w0nw0000gn/T/.tmp7GLCIo/bin-cbindgen
└── cbindgen
I used bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8 and it handles it just fine.
Here's the relevant part of the Cargo.toml:
flate2 = { version = "1.0.24", features = ["zlib-ng"], default-features = false }
tar = "0.4.38"
I discovered this bug in cargo-bins/cargo-binstall#174
When extracting cbindgen-0.24.3-x86_64-apple-darwin.tar.gz using the following equivalent code:
where
datis some readable that is pipelined from the downloading stage, I got:Using
file cbindgenshows that it is just data, does not have executable set and cannot be executed afterchmod +x cbindgen.While it should be:
I used
bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8and it handles it just fine.Here's the relevant part of the
Cargo.toml:I discovered this bug in cargo-bins/cargo-binstall#174