Skip to content

Commit

Permalink
Don't panic on empty args
Browse files Browse the repository at this point in the history
  • Loading branch information
dcondomitti committed Mar 18, 2019
1 parent bb68905 commit 6458965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func NewApiClient(c *cli.Context) (fhclient.ApiClient, error) {

func parseConfigFile(c *cli.Context) error {
// Ignore the empty or missing configuration file if we're creating one
if c.Args()[0] == "init" {
if len(c.Args()) == 0 || c.Args()[0] == "init" {
return nil
}

Expand Down

0 comments on commit 6458965

Please sign in to comment.