Skip to content

Commit

Permalink
Do not print directly to stdout if locale-detection fails (windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Nov 6, 2024
1 parent 199cb57 commit abb819e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/i18n/detect_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@
package i18n

import (
"fmt"
"strings"
"syscall"
"unsafe"

"github.com/sirupsen/logrus"
)

func getLocaleIdentifier() string {
defer func() {
if r := recover(); r != nil {
fmt.Println("failed to get windows user locale", r)
logrus.WithField("error", r).Errorf("Failed to get windows user locale")
}
}()

Expand Down

0 comments on commit abb819e

Please sign in to comment.