Skip to content

Commit 9490b25

Browse files
authored
fix(cli.rs): enable the updater feature on cli (#1597)
1 parent 82ef8f6 commit 9490b25

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

.changes/updater-feature.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"cli.rs": patch
3+
---
4+
5+
Enable `tauri` `updater` feature when `tauri.conf.json > tauri > updater > active` is set to `true`.

examples/api/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ tauri-build = { path = "../../../core/tauri-build" }
1111
[dependencies]
1212
serde_json = "1.0"
1313
serde = { version = "1.0", features = [ "derive" ] }
14-
tauri = { path = "../../../core/tauri", features =["api-all", "cli"]}
14+
tauri = { path = "../../../core/tauri", features =["api-all", "cli", "updater"]}
1515

1616
[features]
1717
default = [ "custom-protocol" ]

examples/updater/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ tauri-build = { path = "../../../core/tauri-build", features = [ "codegen" ]}
1111
[dependencies]
1212
serde_json = "1.0"
1313
serde = { version = "1.0", features = [ "derive" ] }
14-
tauri = { path = "../../../core/tauri", features =["api-all"]}
14+
tauri = { path = "../../../core/tauri", features =["api-all", "updater"]}
1515

1616
[features]
1717
default = [ "custom-protocol" ]

tooling/cli.rs/src/helpers/manifest.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ pub fn rewrite_manifest(config: ConfigHandle) -> crate::Result<()> {
3838
if config.tauri.cli.is_some() {
3939
features.push("cli").unwrap();
4040
}
41+
if config.tauri.updater.active {
42+
features.push("updater").unwrap();
43+
}
4144

4245
match tauri {
4346
Value::InlineTable(tauri_def) => {

0 commit comments

Comments
 (0)