Skip to content

Commit 1e9f356

Browse files
committed
fix: ignore error code 130
this restores the behaviour of ignoring rc=130 which signifies SIGTERM.
1 parent 1b4d28c commit 1e9f356

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/cmd/run.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,8 @@ func runCommandWithFallbacks(container string, command []string, emitEscapeSeque
385385
} else {
386386
return nil
387387
}
388+
case 130:
389+
return nil
388390
default:
389391
return &exitError{exitCode, nil}
390392
}
@@ -477,10 +479,10 @@ func constructExecArgs(container string,
477479

478480
execArgs = append(execArgs, []string{
479481
container,
480-
"capsh", "--caps=", "--", "-c", "exec \"$@\"", "/bin/sh",
482+
"capsh", "--caps=", "--", "-c",
481483
}...)
482484

483-
execArgs = append(execArgs, command...)
485+
execArgs = append(execArgs, fmt.Sprintf("exec %s", strings.Join(command, " ")))
484486

485487
return execArgs
486488
}

0 commit comments

Comments
 (0)