diff --git a/cmd/skaffold/app/cmd/delete.go b/cmd/skaffold/app/cmd/delete.go index 656dbaaa693..1968f41f086 100644 --- a/cmd/skaffold/app/cmd/delete.go +++ b/cmd/skaffold/app/cmd/delete.go @@ -55,7 +55,7 @@ func doDelete(ctx context.Context, out io.Writer) error { manifestListByConfig, err := r.Render(ctx, io.Discard, bRes, false) if err != nil { - return err + return fmt.Errorf("rendering manifests: %w", err) } return r.Cleanup(ctx, out, dryRun, manifestListByConfig, opts.Command) }) diff --git a/cmd/skaffold/app/cmd/deploy.go b/cmd/skaffold/app/cmd/deploy.go index ac3a3de8885..681ed9ea935 100644 --- a/cmd/skaffold/app/cmd/deploy.go +++ b/cmd/skaffold/app/cmd/deploy.go @@ -18,6 +18,7 @@ package cmd import ( "context" + "fmt" "io" "github.com/spf13/cobra" @@ -54,7 +55,7 @@ func doDeploy(ctx context.Context, out io.Writer) error { // Render manifests, errR := r.Render(ctx, out, buildArtifacts, false) if errR != nil { - return errR + return fmt.Errorf("rendering manifests: %w", errR) } return r.DeployAndLog(ctx, out, buildArtifacts, manifests) })