Skip to content

Commit

Permalink
Do not print Succeeded for help command
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenrewar committed Sep 13, 2022
1 parent e6caeca commit ed8c3f2
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
6 changes: 5 additions & 1 deletion cmd/kapp/kapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"os"
"time"

"github.com/cppforlife/cobrautil"
uierrs "github.com/cppforlife/go-cli-ui/errors"
"github.com/cppforlife/go-cli-ui/ui"
"github.com/vmware-tanzu/carvel-kapp/pkg/kapp/cmd"
Expand Down Expand Up @@ -45,6 +46,9 @@ func nonExitingMain() error {
return err
}

confUI.PrintLinef("Succeeded")
if !cobrautil.IsCobraInternalCommand(os.Args) {
confUI.PrintLinef("Succeeded")
}

return nil
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/vmware-tanzu/carvel-kapp
go 1.18

require (
github.com/cppforlife/cobrautil v0.0.0-20200514214827-bb86e6965d72
github.com/cppforlife/cobrautil v0.0.0-20220907150944-da5ee3a6ab1f
github.com/cppforlife/color v1.9.1-0.20200716202919-6706ac40b835
github.com/cppforlife/go-cli-ui v0.0.0-20200716203538-1e47f820817f
github.com/cppforlife/go-patch v0.2.0
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cppforlife/cobrautil v0.0.0-20200514214827-bb86e6965d72 h1:rPWcUBgMb1ox2eCohCuZ8gsZVe0aB5qBbYaBpdoxfCE=
github.com/cppforlife/cobrautil v0.0.0-20200514214827-bb86e6965d72/go.mod h1:2w+qxVu2KSGW78Ex/XaIqfh/OvBgjEsmN53S4T8vEyA=
github.com/cppforlife/cobrautil v0.0.0-20220907150944-da5ee3a6ab1f h1:KkqeYFcNT2SHYUR5cGJ0YZoIZW12yFf36OBWFStufvk=
github.com/cppforlife/cobrautil v0.0.0-20220907150944-da5ee3a6ab1f/go.mod h1:2w+qxVu2KSGW78Ex/XaIqfh/OvBgjEsmN53S4T8vEyA=
github.com/cppforlife/color v1.9.1-0.20200716202919-6706ac40b835 h1:mYQweUIBD+TBRjIeQnJmXr0GSVMpI6O0takyb/aaOgo=
github.com/cppforlife/color v1.9.1-0.20200716202919-6706ac40b835/go.mod h1:dYeVsKp1vvK8XjdTPR1gF+uk+9doxKeO3hqQTOCr7T4=
github.com/cppforlife/go-cli-ui v0.0.0-20200505234325-512793797f05/go.mod h1:I0qrzCmuPWYI6kAOvkllYjaW2aovclWbJ96+v+YyHb0=
Expand Down
23 changes: 21 additions & 2 deletions vendor/github.com/cppforlife/cobrautil/misc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ github.com/PuerkitoBio/purell
# github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578
## explicit
github.com/PuerkitoBio/urlesc
# github.com/cppforlife/cobrautil v0.0.0-20200514214827-bb86e6965d72
# github.com/cppforlife/cobrautil v0.0.0-20220907150944-da5ee3a6ab1f
## explicit
github.com/cppforlife/cobrautil
# github.com/cppforlife/color v1.9.1-0.20200716202919-6706ac40b835
Expand Down

0 comments on commit ed8c3f2

Please sign in to comment.