Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration enhancement #24

Merged
merged 17 commits into from
Oct 5, 2016
Merged

Configuration enhancement #24

merged 17 commits into from
Oct 5, 2016

Conversation

tomsquest
Copy link
Contributor

Solves #21 "Configuration enhancement", see there for details

@tomsquest tomsquest mentioned this pull request Oct 4, 2016
8 tasks
@nono
Copy link
Member

nono commented Oct 4, 2016

Thanks for the PR.

@aenario @jinroh can you look at this PR, and merge it if good for you please?

@jinroh
Copy link
Contributor

jinroh commented Oct 5, 2016

Great work, thanks @tomsquest !

I know this is not from your modifications, but I would also remove the error printing from the Execute error handler in main.go. Errors are printed twice:

func main() {
    if err := cmd.RootCmd.Execute(); err != nil {
        fmt.Println(err) // <- redundant (and print in stdout...)
        os.Exit(-1)
    }
}

Also the exit code should probably be 1 instead of -1 (255)...

If you're OK with this little change, I'll happily merge your PR.

`-1` comes from Cobra docs...
The name is printed in the help:

BEFORE:
```
$ go run main.go error
Error: unknown command "error" for "cozy"
Run 'cozy --help' for usage.
exit status 1
```

After:
```
$ go run main.go error
Error: unknown command "error" for "cozy-stack"
Run 'cozy-stack --help' for usage.
exit status 1
```
@tomsquest
Copy link
Contributor Author

@jinroh done + some more (see logs)

@jinroh jinroh merged commit de9cf34 into cozy:master Oct 5, 2016
@jinroh
Copy link
Contributor

jinroh commented Oct 5, 2016

Merged. Thanks @tomsquest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants