Skip to content

Commit

Permalink
fix macOS tests?
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-crabnebula committed Nov 30, 2023
1 parent f42482e commit 3dc6759
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
3 changes: 1 addition & 2 deletions crates/packager/src/package/deb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,5 @@ fn create_tar_from_dir<P: AsRef<Path>, W: Write>(src_dir: P, dest_file: W) -> cr
tar_builder.append_data(&mut header, dest_path, &mut src_file)?;
}
}
let dest_file = tar_builder.into_inner()?;
Ok(dest_file)
tar_builder.into_inner().map_err(Into::into)
}
38 changes: 19 additions & 19 deletions crates/updater/tests/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ fn update_app() {
_ => unreachable!(),
});
let installer_path = dunce::simplified(&installer_path);
dbg!(installer_path);

let mut installer_arg = std::ffi::OsString::new();
installer_arg.push("\"");
Expand Down Expand Up @@ -280,25 +279,26 @@ fn update_app() {
let mut counter = 0;
loop {
// check if the main binary creation time has changed since `ctime1`
let ctime2 = std::fs::metadata(&app)
.expect("failed to read app metadata")
.created()
.unwrap();
dbg!(ctime1, ctime2);
if ctime1 != ctime2 {
match Command::new(&app).output() {
Ok(o) => {
let output = String::from_utf8_lossy(&o.stdout).to_string();
let version = output.split_once('\n').unwrap().0;
if version == "1.0.0" {
println!("app is updated, new version: {version}");
break;
if app.exists() {
let ctime2 = std::fs::metadata(&app)
.expect("failed to read app metadata")
.created()
.unwrap();
if ctime1 != ctime2 {
match Command::new(&app).output() {
Ok(o) => {
let output = String::from_utf8_lossy(&o.stdout).to_string();
let version = output.split_once('\n').unwrap().0;
if version == "1.0.0" {
println!("app is updated, new version: {version}");
break;
}
println!("unexpected output (stdout): {output}");
eprintln!("stderr: {}", String::from_utf8_lossy(&o.stderr));
}
Err(e) => {
eprintln!("failed to check if app was updated: {e}");
}
println!("unexpected output (stdout): {output}");
eprintln!("stderr: {}", String::from_utf8_lossy(&o.stderr));
}
Err(e) => {
eprintln!("failed to check if app was updated: {e}");
}
}
}
Expand Down
1 change: 0 additions & 1 deletion examples/wails/frontend/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ let resultElement = document.getElementById("result");

// Setup the greet function
window.greet = () => {
console.log("1");
// Get name
let name = nameElement.value;

Expand Down

0 comments on commit 3dc6759

Please sign in to comment.