Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/fig_install/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ fn get_file_type(ctx: &Context, variant: &Variant) -> Result<FileType, Error> {
match variant {
// Linux desktop currently cannot distinguish between AppImage and packages.
Variant::Full => Err(Error::FileTypeNotFound),
Variant::Minimal => Ok(FileType::TarGz),
Variant::Minimal => Ok(FileType::TarZst),
Variant::Other(_) => Err(Error::UnsupportedPlatform),
}
},
Expand Down
2 changes: 2 additions & 0 deletions crates/fig_install/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub use os::uninstall_terminal_integrations;
use thiserror::Error;
use tokio::sync::mpsc::Receiver;
use tracing::{
debug,
error,
info,
};
Expand Down Expand Up @@ -180,6 +181,7 @@ pub async fn update(
info!("Checking for updates...");
if let Some(update) = check_for_updates(ignore_rollout).await? {
info!("Found update: {}", update.version);
debug!("Update info: {:?}", update);

if ctx.platform().os() == Os::Linux && manifest().variant == Variant::Full {
return Err(Error::UpdateFailed(
Expand Down
7 changes: 6 additions & 1 deletion crates/fig_install/src/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ use fig_util::directories::{
local_webview_data_dir,
};
use tokio::sync::mpsc::Sender;
use tracing::warn;
use tracing::{
debug,
warn,
};
use url::Url;

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

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

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