From aa8e0bb509f3e9649543a1906db040dea11f67ad Mon Sep 17 00:00:00 2001 From: Dan Kegel Date: Sat, 22 Jan 2022 17:59:53 -0800 Subject: [PATCH] os: isWine: be compatible with older versions of wine, too Turns out wine 5.x doesn't export WINEUSERNAME. --- src/os/path_windows_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/path_windows_test.go b/src/os/path_windows_test.go index 07dc83aa..520ee5e3 100644 --- a/src/os/path_windows_test.go +++ b/src/os/path_windows_test.go @@ -54,7 +54,7 @@ func TestFixLongPath(t *testing.T) { // isWine returns true if executing on wine (Wine Is Not an Emulator), which // is compatible with windows but does not reproduce all its quirks. func isWine() bool { - return os.Getenv("WINEUSERNAME") != "" + return os.Getenv("WINECONFIGDIR") != "" } func TestMkdirAllExtendedLength(t *testing.T) {