exitCode extracts the exit code from an exec error.
(err error)
| 268 | |
| 269 | // exitCode extracts the exit code from an exec error. |
| 270 | func exitCode(err error) int { |
| 271 | var exitErr *exec.ExitError |
| 272 | if errors.As(err, &exitErr) { |
| 273 | return exitErr.ExitCode() |
| 274 | } |
| 275 | return 1 |
| 276 | } |
| 277 | |
| 278 | // acceptEnvPair reports whether the environment variable key=value pair |
| 279 | // should be accepted from the client (same default as OpenSSH AcceptEnv). |
no outgoing calls
no test coverage detected