mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-10-22 03:49:31 +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)
|
umount, err = e.MountRWPartition(persistentPart)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
u.config.Logger.Warnf("could not mount persistent partition: %s", err.Error())
|
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