Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
c1a81c6f
Commit
c1a81c6f
authored
Mar 11, 2024
by
Daniel Hiltgen
Browse files
Use stdin for term discovery on windows
When you feed input to the cmd via a pipe it no longer reports a warning
parent
e72c567c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
cmd/cmd.go
cmd/cmd.go
+1
-2
No files found.
cmd/cmd.go
View file @
c1a81c6f
...
@@ -900,8 +900,7 @@ func NewCLI() *cobra.Command {
...
@@ -900,8 +900,7 @@ func NewCLI() *cobra.Command {
cobra
.
EnableCommandSorting
=
false
cobra
.
EnableCommandSorting
=
false
if
runtime
.
GOOS
==
"windows"
{
if
runtime
.
GOOS
==
"windows"
{
// Enable colorful ANSI escape code in Windows terminal (disabled by default)
console
.
ConsoleFromFile
(
os
.
Stdin
)
//nolint:errcheck
console
.
ConsoleFromFile
(
os
.
Stdout
)
//nolint:errcheck
}
}
rootCmd
:=
&
cobra
.
Command
{
rootCmd
:=
&
cobra
.
Command
{
...
...
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