We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62bcc50 commit ac3abdcCopy full SHA for ac3abdc
pathing/config_file_test.go
@@ -5,6 +5,7 @@ package pathing
5
6
import (
7
"fmt"
8
+ "os"
9
"os/user"
10
"path/filepath"
11
"runtime"
@@ -17,6 +18,9 @@ func platform_user() string {
17
18
// on the windows platform, whereas the correct way is to use
19
// the api or to scrape `net user`.
20
if runtime.GOOS == "windows" {
21
+ if loginUser := os.Getenv("USERNAME"); loginUser != "" {
22
+ return loginUser
23
+ }
24
return "Administrator"
25
}
26
return "root"
0 commit comments