Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1374 from jonboulle/master
Browse files Browse the repository at this point in the history
fleetd: fix argument handling
  • Loading branch information
jonboulle committed Oct 12, 2015
2 parents 3178aed + 445025b commit b67a4d1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fleetd/fleetd.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@ func main() {
printVersion := userset.Bool("version", false, "Print the version and exit")
cfgPath := userset.String("config", "", fmt.Sprintf("Path to config file. Fleet will look for a config at %s by default.", DefaultConfigFile))

userset.Usage = func() {
fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
userset.PrintDefaults()
}

err := userset.Parse(os.Args[1:])
if err == flag.ErrHelp {
if err != nil {
userset.Usage()
os.Exit(1)
}
Expand Down

0 comments on commit b67a4d1

Please sign in to comment.