Commit fe60ff17 authored by Adam Reese's avatar Adam Reese

feat(debug): add debug flag

parent 4fc6a7b6
......@@ -8,6 +8,7 @@ import (
)
var version = "0.0.1"
var isDebugging bool
func main() {
app := cli.NewApp()
......@@ -24,6 +25,15 @@ func main() {
EnvVar: "HELM_HOST",
Value: "https://localhost:8181/FIXME_NOT_RIGHT",
},
cli.BoolFlag{
Name: "debug",
Usage: "Enable verbose debugging output",
},
}
app.Before = func(ctx *cli.Context) error {
isDebugging = ctx.Bool("debug")
return nil
}
app.Run(os.Args)
......
......@@ -23,7 +23,7 @@ func listCmd() cli.Command {
}
func list(host string) error {
client := dm.NewClient(host).SetDebug(true)
client := dm.NewClient(host).SetDebug(isDebugging)
list, err := client.ListDeployments()
if err != nil {
return err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment