MCPcopy Create free account
hub / github.com/tailscale/tailscale / isNonZeroExitCode

Function isNonZeroExitCode

tstest/integration/integration_test.go:537–548  ·  view source on GitHub ↗

Returns true if the error returned by [exec.Run] fails with a non-zero exit code, false otherwise.

(err error)

Source from the content-addressed store, hash-verified

535// Returns true if the error returned by [exec.Run] fails with a non-zero
536// exit code, false otherwise.
537func isNonZeroExitCode(err error) bool {
538 if err == nil {
539 return false
540 }
541
542 exitError, ok := err.(*exec.ExitError)
543 if !ok {
544 return false
545 }
546
547 return exitError.ExitCode() != 0
548}
549
550// If we interrupt `tailscale up` and then run it again, we should only
551// print a single auth URL.

Callers 3

TestTailnetLockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…