Skip to content

Commit abb819e

Browse files
committed
Do not print directly to stdout if locale-detection fails (windows)
1 parent 199cb57 commit abb819e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: internal/i18n/detect_windows.go

+3-2
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)