mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-10-21 11:29:15 +00:00
add umount to cleanup stack just if mount succeeded (#888)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user