Skip to content

Commit 4d757c4

Browse files
Fix minimal Linux installation filetype (#234)
1 parent a852720 commit 4d757c4

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

crates/fig_install/src/index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ fn get_file_type(ctx: &Context, variant: &Variant) -> Result<FileType, Error> {
386386
match variant {
387387
// Linux desktop currently cannot distinguish between AppImage and packages.
388388
Variant::Full => Err(Error::FileTypeNotFound),
389-
Variant::Minimal => Ok(FileType::TarGz),
389+
Variant::Minimal => Ok(FileType::TarZst),
390390
Variant::Other(_) => Err(Error::UnsupportedPlatform),
391391
}
392392
},

crates/fig_install/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub use os::uninstall_terminal_integrations;
3535
use thiserror::Error;
3636
use tokio::sync::mpsc::Receiver;
3737
use tracing::{
38+
debug,
3839
error,
3940
info,
4041
};
@@ -180,6 +181,7 @@ pub async fn update(
180181
info!("Checking for updates...");
181182
if let Some(update) = check_for_updates(ignore_rollout).await? {
182183
info!("Found update: {}", update.version);
184+
debug!("Update info: {:?}", update);
183185

184186
if ctx.platform().os() == Os::Linux && manifest().variant == Variant::Full {
185187
return Err(Error::UpdateFailed(

crates/fig_install/src/linux.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ use fig_util::directories::{
1414
local_webview_data_dir,
1515
};
1616
use tokio::sync::mpsc::Sender;
17-
use tracing::warn;
17+
use tracing::{
18+
debug,
19+
warn,
20+
};
1821
use url::Url;
1922

2023
use crate::download::download_file;
@@ -79,6 +82,7 @@ fn extract_archive(archive_path: &Path, tempdir: &Path) -> Result<(), Error> {
7982
let file = std::fs::File::open(archive_path)?;
8083
let mut decoder = zstd::Decoder::new(file)?;
8184
let mut tar = tar::Archive::new(&mut decoder);
85+
debug!("unpacking tar to directory: {:?}", tempdir);
8286
tar.unpack(tempdir)?;
8387
Ok(())
8488
}
@@ -141,6 +145,7 @@ pub(crate) async fn update(
141145

142146
let archive_path = tempdir.path().join(archive.file_name);
143147

148+
debug!("downloading file: {:?} to path: {:?}", download_url, archive_path);
144149
let real_hash = download_file(download_url.clone(), &archive_path, size, Some(tx.clone())).await?;
145150
if sha256 != real_hash {
146151
return Err(Error::UpdateFailed(format!(

0 commit comments

Comments
 (0)