Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-cmds
Commits
b21055ce
Unverified
Commit
b21055ce
authored
Mar 04, 2019
by
Steven Allen
Committed by
GitHub
Mar 04, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #153 from djdv/fix/win-stdio
cli: don't sync output to NUL on Windows
parents
0dedcefc
f6962d28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
cli/error_windows.go
cli/error_windows.go
+5
-2
No files found.
cli/error_windows.go
View file @
b21055ce
...
...
@@ -6,11 +6,14 @@ import (
"syscall"
)
const
invalid_file_handle
syscall
.
Errno
=
0x6
const
(
invalid_file_handle
syscall
.
Errno
=
0x6
// console output is not buffered on this platform
invalid_handle_function
syscall
.
Errno
=
0x1
// this is specifically returned when NUL is the FlushFileBuffers target
)
func
isErrnoNotSupported
(
err
error
)
bool
{
switch
err
{
case
syscall
.
EINVAL
,
syscall
.
ENOTSUP
,
syscall
.
ENOTTY
,
invalid_file_handle
:
case
syscall
.
EINVAL
,
syscall
.
ENOTSUP
,
syscall
.
ENOTTY
,
invalid_file_handle
,
invalid_handle_function
:
return
true
}
return
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment