Skip to content

Commit

Permalink
Add error handling for command-line arguments to prevent browser erro…
Browse files Browse the repository at this point in the history
…r pop-ups (#146)
  • Loading branch information
Nemat97 authored Aug 27, 2024
1 parent 622c3f6 commit 035e6e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ func main() {
// for the resourcePredictor to use the correct APICluster, we need to
// call parse already. Note that this won't parse the flag for
// completion but it will work for the default and env.
_, _ = parser.Parse(os.Args[1:])
_, err = parser.Parse(os.Args[1:])
if err != nil {
return nil, err
}
// the client for the predictor requires a static token in the client config
// since dynamic exec config seems to break with some shells during completion.
// The exact reason for that is unknown.
Expand Down

0 comments on commit 035e6e3

Please sign in to comment.