You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry if I somehow missed this in the docs, but does self_update support xz compression for formats such as .tar.xz
I'm having trouble running the updated binary from a .tar.xz archive, but I'm not sure if this is the reason causing the problem.
Here is my update code that I took from the README
// Cargo.toml
self_update = {version = "0.41.0", features = ["archive-tar","archive-zip","compression-flate2","compression-zip-deflate"]}
fnupdate() -> Result<(),Box<dyn(::std::error::Error)>>{let status = self_update::backends::github::Update::configure().repo_owner("hey2022").repo_name("tls-xb").bin_name("tls-xb").show_download_progress(true).current_version(cargo_crate_version!()).build()?
.update()?;println!("Update status: `{}`!",status.version());Ok(())}
The output:
Checking target-arch... x86_64-unknown-linux-gnu
Checking current version... v0.3.5
Checking latest released version... v0.3.6
New release found! v0.3.5 --> v0.3.6
New release is compatible
tls-xb release status:
* Current exe: "/home/yiheng/.cargo/bin/tls-xb"
* New exe release: "tls-xb-x86_64-unknown-linux-gnu.tar.xz"
* New exe download url: "https://api.github.com/repos/hey2022/tls-xb/releases/assets/212553928"
The new release will be downloaded/extracted and the existing binary will be replaced.
Do you want to continue? [Y/n]
Downloading...
[00:00:00] [========================================] 2.65 MiB/2.65 MiB (0s) Done Extracting archive... Done
Replacing binary file... Done
Update status: `0.3.6`!
Trying to run the program again results in:
exec: Failed to execute process: '/home/yiheng/.cargo/bin/tls-xb' the file could not be run by the operating system.
The output of tar -tf /home/yiheng/.cargo/bin/tls-xb shows that /home/yiheng/.cargo/bin/tls-xb is still a tar archive
tar -tf ~/.cargo/bin/tls-xb
tls-xb-x86_64-unknown-linux-gnu/
tls-xb-x86_64-unknown-linux-gnu/README.md
tls-xb-x86_64-unknown-linux-gnu/tls-xb
The text was updated successfully, but these errors were encountered:
Sorry if I somehow missed this in the docs, but does self_update support xz compression for formats such as .tar.xz
I'm having trouble running the updated binary from a .tar.xz archive, but I'm not sure if this is the reason causing the problem.
Here is my update code that I took from the README
The output:
Trying to run the program again results in:
The output of
tar -tf /home/yiheng/.cargo/bin/tls-xb
shows that/home/yiheng/.cargo/bin/tls-xb
is still a tar archiveThe text was updated successfully, but these errors were encountered: