Skip to content

Commit 1bce739

Browse files
fix: Returns a warning instead of panicking if an AppImage is not mounted, closes #7736 (#7843)
Co-authored-by: Lucas Nogueira <[email protected]> Co-authored-by: Lucas Fernandes Nogueira <[email protected]>
1 parent 228e5a4 commit 1bce739

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.changes/validate-appimage.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch:bug
3+
---
4+
5+
Fix the validation of `std::env::current_exe` warn the user if AppImage is not mounted instead of panicking

core/tauri-utils/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ memchr = "2"
3838
semver = "1"
3939
infer = "0.12"
4040
dunce = "1"
41+
log = "0.4.20"
4142

4243
[target."cfg(target_os = \"linux\")".dependencies]
4344
heck = "0.4"

core/tauri-utils/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ use std::{
2222
use semver::Version;
2323
use serde::{Deserialize, Deserializer, Serialize, Serializer};
2424

25+
use log::warn;
26+
2527
pub mod assets;
2628
pub mod config;
2729
pub mod html;
@@ -306,7 +308,7 @@ impl Default for Env {
306308
.unwrap_or(true);
307309

308310
if !is_temp {
309-
panic!("`APPDIR` or `APPIMAGE` environment variable found but this application was not detected as an AppImage; this might be a security issue.");
311+
warn!("`APPDIR` or `APPIMAGE` environment variable found but this application was not detected as an AppImage; this might be a security issue.");
310312
}
311313
}
312314
env

0 commit comments

Comments
 (0)