This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git
commit c453cc9213c8f34c7a2c053630c559795039e564 Author: Rohit Yadav <ro...@apache.org> AuthorDate: Fri Apr 13 18:22:45 2018 +0530 cmk: on error return non-zero exit code Signed-off-by: Rohit Yadav <ro...@apache.org> --- cli/selector.go | 4 ++-- cli/shell.go | 2 +- cmk.go | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cli/selector.go b/cli/selector.go index d0c3656..cfb8629 100644 --- a/cli/selector.go +++ b/cli/selector.go @@ -67,7 +67,7 @@ func ShowSelector(options []SelectOption) SelectOption { --------- Current Selection ---------- {{ "Id:" | faint }} {{ .Id }} {{ "Name:" | faint }} {{ .Name }} -{{ "Description:" | faint }} {{ .Detail }}`, +{{ "Info:" | faint }} {{ .Detail }}`, } searcher := func(input string, index int) bool { @@ -79,7 +79,7 @@ func ShowSelector(options []SelectOption) SelectOption { } prompt := promptui.Select{ - Label: "Use the arrow keys to navigate: β β β β. Press / to toggle πsearch", + Label: "Use the arrow keys to navigate: β β β β press / to toggle πsearch", Items: options, Templates: templates, Size: 5, diff --git a/cli/shell.go b/cli/shell.go index 593c13d..bf9f93e 100644 --- a/cli/shell.go +++ b/cli/shell.go @@ -81,7 +81,7 @@ func ExecShell(cfg *config.Config) { err = ExecCmd(cfg, args, shell) if err != nil { - fmt.Println("Error:", err) + fmt.Println("π Error:", err) } } } diff --git a/cmk.go b/cmk.go index 68fcb3d..b557f48 100644 --- a/cmk.go +++ b/cmk.go @@ -18,6 +18,7 @@ package main import ( + "fmt" "os" "cloudmonkey/cli" @@ -28,7 +29,11 @@ func main() { args := os.Args[1:] cfg := config.NewConfig() if len(args) > 0 { - cli.ExecCmd(cfg, args, nil) + err := cli.ExecCmd(cfg, args, nil) + if err != nil { + fmt.Println("π Error:", err) + os.Exit(1) + } } else { cli.ExecShell(cfg) } -- To stop receiving notification emails like this one, please contact ro...@apache.org.