Skip to content

Commit dc4a336

Browse files
authored
Merge pull request #3673 from ActiveState/mitchell/dx-3243
Log a warning if a depot artifact to undeploy does not exist.
2 parents faaba18 + 693ee3c commit dc4a336

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)