Prettify console output message (#1396)
This commit is contained in:
@@ -20,12 +20,17 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/fission/fission/cmd/fission-cli/app"
|
||||
"github.com/fission/fission/pkg/fission-cli/console"
|
||||
)
|
||||
|
||||
func main() {
|
||||
err := app.App().Execute()
|
||||
cmd := app.App()
|
||||
cmd.SilenceErrors = true // use our own error message printer
|
||||
|
||||
err := cmd.Execute()
|
||||
if err != nil {
|
||||
// let program exit with non-zero code when error occurs
|
||||
console.Error(err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user