diff --git a/src/syscall/syscall_plan9.go b/src/syscall/syscall_plan9.go index 92414709ef4609..759f8051e860f3 100644 --- a/src/syscall/syscall_plan9.go +++ b/src/syscall/syscall_plan9.go @@ -12,6 +12,7 @@ package syscall import ( + "errors" "internal/oserror" "runtime" "unsafe" @@ -43,6 +44,8 @@ func (e ErrorString) Is(target error) bool { case oserror.ErrNotExist: return checkErrMessageContent(e, "does not exist", "not found", "has been removed", "no parent") + case errors.ErrUnsupported: + return checkErrMessageContent(e, "not supported") } return false } diff --git a/src/syscall/syscall_windows.go b/src/syscall/syscall_windows.go index 1d8b6568c078ff..ae9b49a28d4ac7 100644 --- a/src/syscall/syscall_windows.go +++ b/src/syscall/syscall_windows.go @@ -156,6 +156,8 @@ func (e Errno) Is(target error) bool { return e == ERROR_FILE_NOT_FOUND || e == _ERROR_BAD_NETPATH || e == ERROR_PATH_NOT_FOUND + case errorspkg.ErrUnsupported: + return e == EWINDOWS } return false }