Cleanup only if something was built
@@ -287,9 +287,12 @@ func (r *SkaffoldRunner) cleanUpOnCtrlC(ctx context.Context) error {
}()
errRun := r.watchBuildDeploy(ctx)
+ // Cleanup only if something was built
+ if r.builds != nil {
if err := r.Cleanup(ctx, r.out); err != nil {
logrus.Warnln("cleanup:", err)
}
+ }
return errRun
}
