Skip to content

Commit d40d73c

Browse files
committed
Log a warning if a depot artifact to undeploy does not exist.
Do not error out.
1 parent 09f8b37 commit d40d73c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/runtime/depot.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,11 @@ func (d *depot) Undeploy(id strfmt.UUID, relativeSrc, path string) error {
331331

332332
// Perform uninstall based on deployment type
333333
if err := smartlink.UnlinkContents(filepath.Join(d.Path(id), relativeSrc), path); err != nil {
334-
return errs.Wrap(err, "failed to unlink artifact")
334+
if os.IsNotExist(err) {
335+
logging.Warning("artifact no longer exists: %s", filepath.Join(d.Path(id), relativeSrc))
336+
} else {
337+
return errs.Wrap(err, "failed to unlink artifact")
338+
}
335339
}
336340

337341
// Re-link or re-copy any files provided by other artifacts.

0 commit comments

Comments
 (0)