Skip to content

Commit

Permalink
fix: Returns a warning instead of panicking if an AppImage is not mou…
Browse files Browse the repository at this point in the history
…nted, closes #7736 (#7843)

Co-authored-by: Lucas Nogueira <[email protected]>
Co-authored-by: Lucas Fernandes Nogueira <[email protected]>
  • Loading branch information
3 people authored Sep 28, 2023
1 parent 228e5a4 commit 1bce739
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/validate-appimage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": patch:bug
---

Fix the validation of `std::env::current_exe` warn the user if AppImage is not mounted instead of panicking
1 change: 1 addition & 0 deletions core/tauri-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ memchr = "2"
semver = "1"
infer = "0.12"
dunce = "1"
log = "0.4.20"

[target."cfg(target_os = \"linux\")".dependencies]
heck = "0.4"
Expand Down
4 changes: 3 additions & 1 deletion core/tauri-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ use std::{
use semver::Version;
use serde::{Deserialize, Deserializer, Serialize, Serializer};

use log::warn;

pub mod assets;
pub mod config;
pub mod html;
Expand Down Expand Up @@ -306,7 +308,7 @@ impl Default for Env {
.unwrap_or(true);

if !is_temp {
panic!("`APPDIR` or `APPIMAGE` environment variable found but this application was not detected as an AppImage; this might be a security issue.");
warn!("`APPDIR` or `APPIMAGE` environment variable found but this application was not detected as an AppImage; this might be a security issue.");
}
}
env
Expand Down

0 comments on commit 1bce739

Please sign in to comment.