Skip to content

Commit 81c5bc0

Browse files
jLynxlucasfernog
authored andcommitted
fix(macOS): Tauri V2 Update Permission Denied Error (tauri-apps#2067)
* WIP * Fixed linting * WIP * Fixed linting * use osakit to show actual app name on dialog * sync versions * lint --------- Co-authored-by: Lucas Nogueira <[email protected]>
1 parent 35bd8a4 commit 81c5bc0

File tree

6 files changed

+171
-52
lines changed

6 files changed

+171
-52
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"updater": patch
3+
"updater-js": patch
4+
---
5+
6+
Fix update installation on macOS when using an user without admin privileges.

.changes/updater-new-fn.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"updater": minor
3+
"updater-js": minor
4+
---
5+
6+
Remove the `UpdaterBuilder::new` function, use `UpdaterExt::updater_builder` instead.

Cargo.lock

Lines changed: 72 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/updater/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ flate2 = { version = "1", optional = true }
6262
[target."cfg(target_os = \"macos\")".dependencies]
6363
tar = "0.4"
6464
flate2 = "1"
65+
osakit = { version = "0.3", features = ["full"] }
6566

6667
[features]
6768
default = ["rustls-tls", "zip"]

plugins/updater/src/lib.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,14 @@ pub trait UpdaterExt<R: Runtime> {
7070
impl<R: Runtime, T: Manager<R>> UpdaterExt<R> for T {
7171
fn updater_builder(&self) -> UpdaterBuilder {
7272
let app = self.app_handle();
73-
let package_info = app.package_info();
7473
let UpdaterState {
7574
config,
7675
target,
7776
version_comparator,
7877
headers,
7978
} = self.state::<UpdaterState>().inner();
8079

81-
let mut builder = UpdaterBuilder::new(
82-
package_info.name.clone(),
83-
package_info.version.clone(),
84-
config.clone(),
85-
)
86-
.headers(headers.clone());
80+
let mut builder = UpdaterBuilder::new(app, config.clone()).headers(headers.clone());
8781

8882
if let Some(target) = target {
8983
builder = builder.target(target);

0 commit comments

Comments
 (0)