Skip to content

Commit

Permalink
she-decode: Check if key is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
aburdulescu committed Apr 11, 2024
1 parent c7e9d0f commit 07e515e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/she/cmd/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ func runDecode(cmd *cmd.Command) error {
return err
}

if *keyHex == "" {
return fmt.Errorf("secret key(-key) not specified")
}

input := cmd.Flags.Arg(0)
if cmd.Flags.NArg() == 0 {
data, err := io.ReadAll(os.Stdin)
Expand Down

0 comments on commit 07e515e

Please sign in to comment.