app/start: skip cleanup if shim is nil
test / test (push) Successful in 19s Details

Shim is created before any system operation happens.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
Ophestra Umiker 2024-10-28 14:21:15 +09:00
parent 60e91b9b0f
commit 431dc095e5
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q
1 changed files with 5 additions and 0 deletions

View File

@ -154,6 +154,11 @@ func (a *app) Wait() (int, error) {
a.lock.Lock()
defer a.lock.Unlock()
if a.shim == nil {
fmsg.VPrintln("shim not initialised, skipping cleanup")
return 1, nil
}
var r int
if cmd := a.shim.Unwrap(); cmd == nil {