Skip to content

Commit

Permalink
FIx #373
Browse files Browse the repository at this point in the history
Signed-off-by: ashpect <ashishndiitr@gmail.com>
  • Loading branch information
ashpect committed Aug 14, 2023
1 parent b3be71d commit 5ffe74a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/imgpkg/cmd/imgpkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ func NewImgpkgCmd(o *ImgpkgOptions) *cobra.Command {
tagCmd.AddCommand(NewTagResolveCmd(NewTagResolveOptions(o.ui)))
cmd.AddCommand(tagCmd)

//Check for empty imgpkg command, and populate it with help command.
if cmd.RunE == nil {
cmd.RunE = cobrautil.ShowHelp
}

// Last one runs first
cobrautil.VisitCommands(cmd, cobrautil.ReconfigureCmdWithSubcmd)
cobrautil.VisitCommands(cmd, cobrautil.DisallowExtraArgs)
Expand Down

0 comments on commit 5ffe74a

Please sign in to comment.