From 431dc095e53b64d33ec4c47aedf3082ec8cffe80 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Mon, 28 Oct 2024 14:21:15 +0900 Subject: [PATCH] app/start: skip cleanup if shim is nil Shim is created before any system operation happens. Signed-off-by: Ophestra Umiker --- internal/app/start.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/app/start.go b/internal/app/start.go index bac3f12..a50be6e 100644 --- a/internal/app/start.go +++ b/internal/app/start.go @@ -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 {