8000 Do not print directly to stdout if locale-detection fails (windows) · arduino/arduino-cli@a6e3276 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a6e3276

Browse files
committed
Do not print directly to stdout if locale-detection fails (windows)
1 parent 317b3de commit a6e3276

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/i18n/detect_windows.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@
1616
package i18n
1717

1818
import (
19-
"fmt"
2019
"strings"
2120
"syscall"
2221
"unsafe"
22+
23+
"github.com/sirupsen/logrus"
2324
)
2425

2526
func getLocaleIdentifier() string {
2627
defer func() {
2728
if r := recover(); r != nil {
28-
fmt.Println("failed to get windows user locale", r)
29+
logrus.WithField("error", r).Errorf("Failed to get windows user locale")
2930
}
3031
}()
3132

0 commit comments

Comments
 (0)
0