diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-11-17 23:41:52 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-11-17 23:41:52 +0900 |
| commit | c1fad649e8410a088793e952fcffa7a7df552d2d (patch) | |
| tree | 97da35e33aebccb636d67b870e09731933d96887 /internal/app | |
| parent | b5f01ef20b69e155db299f824ad48c9955deedcf (diff) | |
app/start: check for cleanup and abort condition
Dirty fix. Will rewrite after fsu integration complete.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/app')
| -rw-r--r-- | internal/app/start.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/internal/app/start.go b/internal/app/start.go index 0feb0ae6..0b90583a 100644 --- a/internal/app/start.go +++ b/internal/app/start.go @@ -251,9 +251,16 @@ func (a *app) Wait() (int, error) { } } - a.shim.AbortWait(errors.New("shim exited")) - if err := a.seal.sys.Revert(ec); err != nil { - return err.(RevertCompoundError) + if a.shim.Unwrap() == nil { + fmsg.VPrintln("fault before shim start") + } 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 |
