app/start: check for cleanup and abort condition
test / test (push) Successful in 21s Details

Dirty fix. Will rewrite after fsu integration complete.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
Ophestra Umiker 2024-11-17 23:41:52 +09:00
parent b5f01ef20b
commit c1fad649e8
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q
1 changed files with 10 additions and 3 deletions

View File

@ -251,9 +251,16 @@ func (a *app) Wait() (int, error) {
} }
} }
a.shim.AbortWait(errors.New("shim exited")) if a.shim.Unwrap() == nil {
if err := a.seal.sys.Revert(ec); err != nil { fmsg.VPrintln("fault before shim start")
return err.(RevertCompoundError) } else {
a.shim.AbortWait(errors.New("shim exited"))
}
if a.seal.sys.needRevert {
if err := a.seal.sys.Revert(ec); err != nil {
return err.(RevertCompoundError)
}
} }
return nil return nil