Skip to content

Commit f3f521f

Browse files
authored
fix(core): fallback to WRY_ANDROID_PACKAGE with backticks replaced (#11348)
ref: #11332
1 parent e75f0d2 commit f3f521f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changes/android-unescaped.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": "patch:bug"
3+
---
4+
5+
Fix `TAURI_ANDROID_PACKAGE_UNESCAPED not set` panic during compilation for Android when using an older tauri cli.

crates/tauri/build.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ fn main() {
299299
}
300300

301301
if let Some(project_dir) = env::var_os("TAURI_ANDROID_PROJECT_PATH").map(PathBuf::from) {
302-
let package_unescaped = env_var("TAURI_ANDROID_PACKAGE_UNESCAPED");
302+
let package_unescaped = env::var("TAURI_ANDROID_PACKAGE_UNESCAPED")
303+
.unwrap_or_else(|_| env_var("WRY_ANDROID_PACKAGE").replace('`', ""));
303304
let tauri_proguard =
304305
include_str!("./mobile/proguard-tauri.pro").replace("$PACKAGE", &package_unescaped);
305306
std::fs::write(

0 commit comments

Comments
 (0)