Skip to content

Commit

Permalink
feat: fatal if algorithm is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mehditeymorian committed Aug 31, 2022
1 parent 0d48f31 commit 5493981
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/cmd/encode/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ func flagOptions(c *cobra.Command) model.Encode {
iss, _ := c.Flags().GetString("issuer")
aud, _ := c.Flags().GetString("audience")
alg, _ := c.Flags().GetString("algorithm")
if alg == "" {
pterm.Fatal.Println("you have to specify algorithm")
}

return model.Encode{
Algorithm: alg,
Expand Down

0 comments on commit 5493981

Please sign in to comment.