cmd/utils: fix geth test issue on OpenBSD (#31357)

This commit is contained in:
Vladimir Támara Patiño 2025-03-15 13:35:10 -04:00 committed by GitHub
parent e3853e910a
commit 7d99f7df00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,8 +63,8 @@ var ErrImportInterrupted = errors.New("interrupted")
// is redirected to a different file.
func Fatalf(format string, args ...interface{}) {
w := io.MultiWriter(os.Stdout, os.Stderr)
if runtime.GOOS == "windows" {
// The SameFile check below doesn't work on Windows.
if runtime.GOOS == "windows" || runtime.GOOS == "openbsd" {
// The SameFile check below doesn't work on Windows neither OpenBSD.
// stdout is unlikely to get redirected though, so just print there.
w = os.Stdout
} else {