MCPcopy Create free account
hub / github.com/tailscale/tailcat / exitCode

Function exitCode

tailcat_ssh.go:270–276  ·  view source on GitHub ↗

exitCode extracts the exit code from an exec error.

(err error)

Source from the content-addressed store, hash-verified

268
269// exitCode extracts the exit code from an exec error.
270func 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).

Callers 2

runWithPTYFunction · 0.85
runWithPipesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected