add umount to cleanup stack just if mount succeeded (#888)

This commit is contained in:
romario-07
2025-07-30 11:00:04 +03:00
committed by GitHub
parent 6dac7ffc83
commit 7087ed136e

View File

@@ -176,8 +176,9 @@ func (u *UpgradeAction) Run() (err error) {
umount, err = e.MountRWPartition(persistentPart)
if err != nil {
u.config.Logger.Warnf("could not mount persistent partition: %s", err.Error())
} else {
cleanup.Push(umount)
}
cleanup.Push(umount)
}
}