From f37354e675b5801e293a2760d024ee3c70b038ea Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sun, 1 May 2022 16:05:38 -0300 Subject: [PATCH] fix(schema): shell scope `cmd` is not required --- core/tauri-utils/src/config.rs | 2 +- tooling/cli/Cargo.lock | 8 ++++---- tooling/cli/schema.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 06d0e1a5d..dc3822caf 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -1103,7 +1103,7 @@ pub struct ShellAllowedCommand { /// The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, /// `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, /// `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`. - #[serde(rename = "cmd")] + #[serde(rename = "cmd", default)] // use default just so the schema doesn't flag it as required pub command: PathBuf, /// The allowed arguments for the command execution. diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 4e5364fc6..532ebc3cd 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -666,9 +666,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "exr" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4badb9489a465cb2c555af1f00f0bfd8cecd6fc12ac11da9d5b40c5dd5f0200" +checksum = "14cc0e06fb5f67e5d6beadf3a382fec9baca1aa751c6d5368fdeee7e5932c215" dependencies = [ "bit_field", "deflate 1.0.0", @@ -1039,9 +1039,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db207d030ae38f1eb6f240d5a1c1c88ff422aa005d10f8c6c6fc5e75286ab30e" +checksum = "28edd9d7bc256be2502e325ac0628bde30b7001b9b52e0abe31a1a9dc2701212" dependencies = [ "bytemuck", "byteorder", diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index 239130d48..d31588e53 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -1409,7 +1409,6 @@ "description": "A command allowed to be executed by the webview API.", "type": "object", "required": [ - "cmd", "name" ], "properties": { @@ -1424,6 +1423,7 @@ }, "cmd": { "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`.", + "default": "", "type": "string" }, "name": {