feat(debug): add debug flag

pull/291/head
Adam Reese 9 years ago
parent 4fc6a7b6c0
commit fe60ff17c1

@ -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

Loading…
Cancel
Save