Skip to content

Commit

Permalink
Return from RunWithCancel if cmd is kapp
Browse files Browse the repository at this point in the history
Signed-off-by: Devanshu <[email protected]>
  • Loading branch information
devanshuVmware committed Nov 5, 2024
1 parent e4b4822 commit 8185bfa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cli/pkg/kctrl/cmd/app/release/release_cmd_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ func (r ReleaseCmdRunner) Run(cmd *goexec.Cmd) error {
r.ui.PrintHeaderText("Building images and resolving references")
}

if filepath.Base(cmd.Path) == "kapp" {
return nil
}
if filepath.Base(cmd.Path) == "kbld" {
cmd.Args = append(cmd.Args, fmt.Sprintf("--imgpkg-lock-output=%s", r.tempImgLockFilepath))
}
Expand All @@ -57,6 +54,10 @@ func (r ReleaseCmdRunner) Run(cmd *goexec.Cmd) error {
}

func (r ReleaseCmdRunner) RunWithCancel(cmd *goexec.Cmd, cancelCh chan struct{}) error {
if filepath.Base(cmd.Path) == "kapp" {
return nil
}

if r.fullOutput {
cmd.Stdout = io.MultiWriter(r.log, cmd.Stdout)
cmd.Stderr = io.MultiWriter(r.log, cmd.Stderr)
Expand Down

0 comments on commit 8185bfa

Please sign in to comment.