From a4c6ad17dce2b9f048c64110384f1251e254ab7c Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 17 May 2022 01:36:33 +0100 Subject: [PATCH] go/access: detect WSL differently --- go/access/access.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/go/access/access.go b/go/access/access.go index 7cff4440d9..1850fdef76 100644 --- a/go/access/access.go +++ b/go/access/access.go @@ -42,12 +42,8 @@ func currentUsername() string { } func shouldRequirePresence() bool { - hn, err := os.Hostname() - if err != nil { - log.Fatalf("getting hostname: %v", err) - } // WSL2 makes things hard. - return hn != "PORCOROSSO" + return os.Getenv("WSL_DISTRO_NAME") == "" } const (