Skip to content

Commit

Permalink
fix macos tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog-crabnebula committed Nov 17, 2023
1 parent 0950f6c commit a663ae0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 5 additions & 2 deletions crates/packager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
#![cfg_attr(doc_cfg, feature(doc_cfg))]
#![deny(missing_docs)]

use std::path::PathBuf;
use std::{io::Write, path::PathBuf};

mod codesign;
mod error;
Expand Down Expand Up @@ -154,7 +154,10 @@ pub fn sign_outputs(
let zip = path.with_extension(extension);
let dest_file = util::create_file(&zip)?;
let gzip_encoder = libflate::gzip::Encoder::new(dest_file)?;
util::create_tar_from_dir(path, gzip_encoder)?;
let writer = util::create_tar_from_dir(path, gzip_encoder)?;
let mut dest_file = writer.finish().into_result()?;
dest_file.flush()?;

package.paths.push(zip);
package.paths.last().unwrap()
} else {
Expand Down
4 changes: 1 addition & 3 deletions crates/updater/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,9 +734,7 @@ impl Update {
for entry in archive.entries()? {
let mut entry = entry?;

// skip the first folder (should be the app name)
let collected_path: PathBuf = entry.path()?.iter().skip(1).collect();
let extraction_path = &self.extract_path.join(collected_path);
let extraction_path = &self.extract_path.join(entry.path()?);

// if something went wrong during the extraction, we should restore previous app
if let Err(err) = entry.unpack(extraction_path) {
Expand Down

0 comments on commit a663ae0

Please sign in to comment.