Skip to content

Commit

Permalink
fix: check returned error
Browse files Browse the repository at this point in the history
  • Loading branch information
angristan committed Feb 20, 2022
1 parent f719404 commit 687ad5e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmd/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ func init() {
authCmd.PersistentFlags().String("client-id", "", "")
authCmd.PersistentFlags().String("client-secret", "", "")

authCmd.MarkPersistentFlagRequired("client-id")
authCmd.MarkPersistentFlagRequired("client-secret")
err := authCmd.MarkPersistentFlagRequired("client-id")
if err != nil {
logrus.WithError(err).Fatal("Failed to mark client-id flag required")
}
err = authCmd.MarkPersistentFlagRequired("client-secret")
if err != nil {
logrus.WithError(err).Fatal("Failed to mark client-secret flag required")
}
}

0 comments on commit 687ad5e

Please sign in to comment.