diff --git a/cli/error_plan9.go b/cli/error_plan9.go new file mode 100644 index 00000000..aa04fe3f --- /dev/null +++ b/cli/error_plan9.go @@ -0,0 +1,15 @@ +package cli + +import "syscall" + +func isErrnoNotSupported(err error) bool { + switch err { + case + // Operation not supported + syscall.EINVAL, syscall.EPLAN9, + // Sync on os.Stdin or os.Stderr returns "permission denied". + syscall.EPERM: + return true + } + return false +} diff --git a/cli/error_posix.go b/cli/error_posix.go index d2d6b2bb..7ab44166 100644 --- a/cli/error_posix.go +++ b/cli/error_posix.go @@ -1,4 +1,4 @@ -//+build !windows +//+build !windows,!plan9 package cli