Simplify checkIfTerminal for Windows
Instead of relying on EnableVirtualTerminalProcessing from github.com/konsorten/go-windows-terminal-sequences which just calls GetConsoleMode, sets ENABLE_VIRTUAL_TERMINAL_PROCESSING and calls SetConsoleMode with the new modified mode, implement it directly inside checkIfTerminal. This also avoids the duplicate call to GetConsoleMode.
This commit is contained in:
+1
-1
@@ -18,5 +18,5 @@ fi
|
||||
|
||||
if [[ "$GO111MODULE" == "off" ]]; then
|
||||
# Should contain all regular (not indirect) modules from go.mod
|
||||
go get github.com/stretchr/testify golang.org/x/sys/unix github.com/konsorten/go-windows-terminal-sequences
|
||||
go get github.com/stretchr/testify golang.org/x/sys/unix golang.org/x/sys/windows
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user