From 9318eac679eba32d384cc014e35aac954abfe800 Mon Sep 17 00:00:00 2001 From: Peng Peng Date: Fri, 6 Dec 2024 14:40:44 -0800 Subject: [PATCH] Use Windows-compatible ExitStatus in Executor.Wait Signed-off-by: Peng Peng Signed-off-by: Peng Peng --- executor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/executor.go b/executor.go index d0ccf5c..950f9f7 100644 --- a/executor.go +++ b/executor.go @@ -223,7 +223,7 @@ func (e *Executor) Wait(ctx context.Context) (*ExecResult, error) { if err != nil { if exit, ok := err.(*exec.ExitError); ok { - res.ExitStatus = int(exit.ProcessState.Sys().(syscall.WaitStatus) / 256) + res.ExitStatus = exit.ProcessState.Sys().(syscall.WaitStatus).ExitStatus() } }