agola cmd: return exit code 1 on bad command

This commit is contained in:
Simone Gotti 2019-07-02 13:32:27 +02:00
parent 22e8e2080b
commit 540f5888d2
1 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,7 @@ package cmd
import ( import (
"net/url" "net/url"
"os"
"agola.io/agola/cmd" "agola.io/agola/cmd"
slog "agola.io/agola/internal/log" slog "agola.io/agola/internal/log"
@ -75,5 +76,7 @@ func init() {
} }
func Execute() { func Execute() {
cmdAgola.Execute() if err := cmdAgola.Execute(); err != nil {
os.Exit(1)
}
} }