fix: further fixes for gracefully handling missing tag

Follows 1b37d2d5f5.
This commit is contained in:
2022-01-05 17:57:48 +01:00
parent d7e1b2947a
commit d7cf11b876
3 changed files with 28 additions and 21 deletions

View File

@ -241,10 +241,13 @@ You may invoke this command in "wizard" mode and be prompted for input:
}
}
if upgradeTag != "skip" {
if err := recipe.UpdateTag(image, upgradeTag); err != nil {
ok, err := recipe.UpdateTag(image, upgradeTag)
if err != nil {
logrus.Fatal(err)
}
logrus.Infof("tag upgraded from %s to %s for %s", tag.String(), upgradeTag, image)
if ok {
logrus.Infof("tag upgraded from %s to %s for %s", tag.String(), upgradeTag, image)
}
} else {
logrus.Warnf("not upgrading %s, skipping as requested", image)
}