os: isWine: be compatible with older versions of wine, too

Turns out wine 5.x doesn't export WINEUSERNAME.
Этот коммит содержится в:
Dan Kegel 2022-01-22 17:59:53 -08:00 коммит произвёл Ayke
родитель 372d9e0f5e
коммит aa8e0bb509

Просмотреть файл

@ -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) {