Skip to content

Commit 28d18b8

Browse files
authored
Add help text for edge-app run --secret and apply Clippy fixes (#236)
1 parent c2dd531 commit 28d18b8

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

docs/CommandLineHelp.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ Runs Edge App emulator
481481
###### **Options:**
482482

483483
* `-p`, `--path <PATH>` — Path to the directory with the manifest. If not specified CLI will use the current working directory
484-
* `-s`, `--secrets <SECRETS>`
484+
* `-s`, `--secrets <SECRETS>` — Secrets to be passed to the Edge App in the form KEY=VALUE. Can be specified multiple times
485485
* `-g`, `--generate-mock-data` — Generates mock data to be used with Edge App run
486486

487487

src/cli.rs

+1
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ pub enum EdgeAppCommands {
320320
#[arg(short, long)]
321321
path: Option<String>,
322322

323+
/// Secrets to be passed to the Edge App in the form KEY=VALUE. Can be specified multiple times.
323324
#[arg(short, long, value_parser = parse_key_values::<Secrets>)]
324325
secrets: Option<Secrets>,
325326

src/commands/edge_app/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ mod tests {
10721072
}
10731073

10741074
#[test]
1075-
fn test_transform_edge_app_path_to_manifest_when_path_provided_should_return_path_with_instance_manifest(
1075+
fn test_transform_edge_app_path_to_manifest_when_path_provided_should_return_path_with_manifest(
10761076
) {
10771077
let dir = tempdir().unwrap();
10781078
let dir_path = dir.path();

src/commands/serde_utils.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,8 @@ where
6565
}
6666

6767
pub fn string_field_is_none_or_empty(opt: &Option<String>) -> bool {
68-
opt.as_ref().map_or(true, |s| s.is_empty())
68+
match opt.as_ref() {
69+
None => true,
70+
Some(s) => s.is_empty(),
71+
}
6972
}

0 commit comments

Comments
 (0)