File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -100,8 +100,7 @@ var validColors = map[string]bool{
100
100
}
101
101
102
102
// returns true if the OS is windows and the WT_SESSION env variable is set.
103
- var isWindows = runtime .OSOS == "windows"
104
- var isWindowsTerminalOnWindows = len (os .Getenv ("WT_SESSION" )) > 0 && isWindows
103
+ var isWindowsTerminalOnWindows = len (os .Getenv ("WT_SESSION" )) > 0 && runtime .GOOS == "windows"
105
104
106
105
// returns a valid color's foreground text color attribute
107
106
var colorAttributeMap = map [string ]color.Attribute {
@@ -282,12 +281,6 @@ func (s *Spinner) Start() {
282
281
// hides the cursor
283
282
fmt .Fprint (s .Writer , "\033 [?25l" )
284
283
}
285
- // Disable colors for simple Windows CMD or Powershell
286
- // as they can not recognize them
287
- if isWindows && ! isWindowsTerminalOnWindows {
288
- color .NoColor = true
289
- }
290
-
291
284
s .active = true
292
285
s .mu .Unlock ()
293
286
@@ -312,7 +305,7 @@ func (s *Spinner) Start() {
312
305
}
313
306
314
307
var outColor string
315
- if isWindows {
308
+ if runtime . GOOS == "windows" {
316
309
if s .Writer == os .Stderr {
317
310
outColor = fmt .Sprintf ("\r %s%s%s" , s .Prefix , s .chars [i ], s .Suffix )
318
311
} else {
You can’t perform that action at this time.
0 commit comments