diff --git a/.changes/improve-errors-for-missing-links-property.md b/.changes/improve-errors-for-missing-links-property.md new file mode 100644 index 000000000..24a59a46d --- /dev/null +++ b/.changes/improve-errors-for-missing-links-property.md @@ -0,0 +1,6 @@ +--- +'tauri-plugin': patch:enhance +--- + +Improve the error message that is shown when the `links` property is missing from a Tauri Plugin. + diff --git a/core/tauri-plugin/src/build/mod.rs b/core/tauri-plugin/src/build/mod.rs index 559fd78b4..8587c894f 100644 --- a/core/tauri-plugin/src/build/mod.rs +++ b/core/tauri-plugin/src/build/mod.rs @@ -97,7 +97,7 @@ impl<'a> Builder<'a> { let out_dir = PathBuf::from(build_var("OUT_DIR")?); // requirement: links MUST be set and MUST match the name - let _links = build_var("CARGO_MANIFEST_LINKS")?; + let _links = std::env::var("CARGO_MANIFEST_LINKS").map_err(|_| Error::LinksMissing)?; let autogenerated = Path::new("permissions").join(acl::build::AUTOGENERATED_FOLDER_NAME); let commands_dir = autogenerated.join("commands");