fix(cli.rs): enable the updater feature on cli (#1597)

This commit is contained in:
Lucas Fernandes Nogueira 2021-04-23 01:41:51 -03:00 committed by GitHub
parent 82ef8f6a92
commit 9490b257d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
"cli.rs": patch
---
Enable `tauri` `updater` feature when `tauri.conf.json > tauri > updater > active` is set to `true`.

View File

@ -11,7 +11,7 @@ tauri-build = { path = "../../../core/tauri-build" }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = [ "derive" ] }
tauri = { path = "../../../core/tauri", features =["api-all", "cli"]}
tauri = { path = "../../../core/tauri", features =["api-all", "cli", "updater"]}
[features]
default = [ "custom-protocol" ]

View File

@ -11,7 +11,7 @@ tauri-build = { path = "../../../core/tauri-build", features = [ "codegen" ]}
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = [ "derive" ] }
tauri = { path = "../../../core/tauri", features =["api-all"]}
tauri = { path = "../../../core/tauri", features =["api-all", "updater"]}
[features]
default = [ "custom-protocol" ]

View File

@ -38,6 +38,9 @@ pub fn rewrite_manifest(config: ConfigHandle) -> crate::Result<()> {
if config.tauri.cli.is_some() {
features.push("cli").unwrap();
}
if config.tauri.updater.active {
features.push("updater").unwrap();
}
match tauri {
Value::InlineTable(tauri_def) => {