-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: fix ignoring std{out,err} sync errors on windows #146
Conversation
cli/error_windows.go
Outdated
const invalid_file_handle syscall.Errno = 0x6 | ||
|
||
func isErrnoNotSupported(err syscall.Errno) bool { | ||
switch e { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e -> err
if !ok { | ||
return false | ||
} | ||
return perr.Op == "sync" && isErrnoNotSupported(perr.Err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compiler is complaining about a lack of type assertion for perr
cannot convert perr.Err (type error) to type syscall.Errno: need type assertion
Apparently, windows returns "invalid file handle" and golang doesn't translate this to EINVAL. fixes ipfs/kubo#6021
6834247
to
9d994fb
Compare
(fixed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works on my machine seal of approval
fixes ipfs/kubo#6021