Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
Fix panic when kv: command does not have subcommand (#579)
Browse files Browse the repository at this point in the history
* Ensure that when a subcommand is not provided to a kv: command, do not panic. STILL DISPLAYS HELP INFORMATION WITH --binding AND --namespace-id INFO THAT IS INCONSISTENT WITH USAGE (b/c globals are paired with arggroups here)
  • Loading branch information
gabbifish authored Sep 12, 2019
1 parent d33ce50 commit 81ac1e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ fn run() -> Result<(), failure::Error> {
"{} Interact with your Workers KV Namespaces",
emoji::KV
))
.setting(AppSettings::SubcommandRequired)
.subcommand(
SubCommand::with_name("create")
.about("Create a new namespace")
Expand Down Expand Up @@ -118,6 +119,7 @@ fn run() -> Result<(), failure::Error> {
"{} Individually manage Workers KV key-value pairs",
emoji::KV
))
.setting(AppSettings::SubcommandRequired)
.arg(
Arg::with_name("binding")
.help("The binding of the namespace this action applies to")
Expand Down Expand Up @@ -239,6 +241,7 @@ fn run() -> Result<(), failure::Error> {
"{} Interact with multiple Workers KV key-value pairs at once",
emoji::KV
))
.setting(AppSettings::SubcommandRequired)
.arg(
Arg::with_name("binding")
.help("The binding of the namespace this action applies to")
Expand Down

0 comments on commit 81ac1e6

Please sign in to comment.