From d09d21434bc6ef21eef81dd27d2afb9afca16e3b Mon Sep 17 00:00:00 2001 From: Alex X Date: Sat, 14 Oct 2023 08:06:09 +0300 Subject: [PATCH] Panic if shell can't restart process --- pkg/shell/shell.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/shell/shell.go b/pkg/shell/shell.go index 8a73c39b..b9aae5fe 100644 --- a/pkg/shell/shell.go +++ b/pkg/shell/shell.go @@ -90,5 +90,7 @@ func Restart() { return } path = filepath.Clean(path) - _ = syscall.Exec(path, os.Args, os.Environ()) + if err = syscall.Exec(path, os.Args, os.Environ()); err != nil { + panic(err) + } }