Skip to content

Commit 69dcfdf

Browse files
authored
fix(build): skip rerun-if-changed when Info.plist do not exist (#10267)
1 parent 5d29229 commit 69dcfdf

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-build": patch:bug
3+
---
4+
5+
Fix build script rerun-if-changed instruction if Info.plist do not exist next to tauri.conf.json.

core/tauri-build/src/codegen/context.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,12 @@ impl CodegenContext {
115115
}
116116

117117
#[cfg(target_os = "macos")]
118-
println!(
119-
"cargo:rerun-if-changed={}",
120-
config_parent.join("Info.plist").display()
121-
);
118+
{
119+
let info_plist_path = config_parent.join("Info.plist");
120+
if info_plist_path.exists() {
121+
println!("cargo:rerun-if-changed={}", info_plist_path.display());
122+
}
123+
}
122124

123125
let code = context_codegen(ContextData {
124126
dev: crate::is_dev(),

0 commit comments

Comments
 (0)