Skip to content

Commit

Permalink
Fixed possible nil error on flag parse in case there are no parameter…
Browse files Browse the repository at this point in the history
…s provided for the binary (#209)
  • Loading branch information
Skarlso authored Sep 4, 2019
1 parent 32bf82c commit c68f7c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ func init() {
// Start initiates all components of Gaia and starts the server/agent.
func Start() (err error) {
// Parse command line flags
if err := fs.Parse(os.Args[1:]); err.Error() == "flag: help requested" {
return nil
if err := fs.Parse(os.Args[1:]); err != nil {
if err.Error() == "flag: help requested" {
return nil
}
}

// Check version switch
Expand Down

0 comments on commit c68f7c1

Please sign in to comment.