mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-24 12:14:05 +03:00
fix(build): check if permissions
dir exists before adding cargo:rerun-if-changed
(#9471)
closes #9062
This commit is contained in:
parent
daf018e4f5
commit
88c0ad9cf5
6
.changes/core-always-rebuilds-due-to-permissions-dir.md
Normal file
6
.changes/core-always-rebuilds-due-to-permissions-dir.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri-build": "patch:bug"
|
||||
---
|
||||
|
||||
Fix tauri always rebuilding even if source code didn't change.
|
||||
|
@ -360,10 +360,12 @@ pub fn inline_plugins(
|
||||
)?);
|
||||
} else {
|
||||
let default_permissions_path = Path::new("permissions").join(name);
|
||||
println!(
|
||||
"cargo:rerun-if-changed={}",
|
||||
default_permissions_path.display()
|
||||
);
|
||||
if default_permissions_path.exists() {
|
||||
println!(
|
||||
"cargo:rerun-if-changed={}",
|
||||
default_permissions_path.display()
|
||||
);
|
||||
}
|
||||
permission_files.extend(tauri_utils::acl::build::define_permissions(
|
||||
&default_permissions_path
|
||||
.join("**")
|
||||
@ -418,10 +420,12 @@ pub fn app_manifest_permissions(
|
||||
)?);
|
||||
} else {
|
||||
let default_permissions_path = Path::new("permissions");
|
||||
println!(
|
||||
"cargo:rerun-if-changed={}",
|
||||
default_permissions_path.display()
|
||||
);
|
||||
if default_permissions_path.exists() {
|
||||
println!(
|
||||
"cargo:rerun-if-changed={}",
|
||||
default_permissions_path.display()
|
||||
);
|
||||
}
|
||||
|
||||
let permissions_root = current_dir()?.join("permissions");
|
||||
let inlined_plugins_permissions: Vec<_> = inlined_plugins
|
||||
|
Loading…
Reference in New Issue
Block a user