diff --git a/.changes/info-plist-rerun-if-changed.md b/.changes/info-plist-rerun-if-changed.md new file mode 100644 index 000000000..736cdee41 --- /dev/null +++ b/.changes/info-plist-rerun-if-changed.md @@ -0,0 +1,5 @@ +--- +"tauri-build": patch:bug +--- + +Fix build script rerun-if-changed instruction if Info.plist do not exist next to tauri.conf.json. diff --git a/core/tauri-build/src/codegen/context.rs b/core/tauri-build/src/codegen/context.rs index f003523ad..224857e10 100644 --- a/core/tauri-build/src/codegen/context.rs +++ b/core/tauri-build/src/codegen/context.rs @@ -115,10 +115,12 @@ impl CodegenContext { } #[cfg(target_os = "macos")] - println!( - "cargo:rerun-if-changed={}", - config_parent.join("Info.plist").display() - ); + { + let info_plist_path = config_parent.join("Info.plist"); + if info_plist_path.exists() { + println!("cargo:rerun-if-changed={}", info_plist_path.display()); + } + } let code = context_codegen(ContextData { dev: crate::is_dev(),