We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 060761a commit 2b446e7Copy full SHA for 2b446e7
cmd/root.go
@@ -59,7 +59,16 @@ func init() {
59
60
switch runtime.GOOS {
61
case "linux": save = "/tmp/screenshot.png"
62
- case "windows": save = fmt.Sprintf("%s\\AppData\\Local\\Temp\\screenshot.png", os.Getenv("HOME"))
+
63
+ case "windows":
64
+ if os.Getenv("USERPROFILE") != "" {
65
+ save = fmt.Sprintf("%s\\AppData\\Local\\Temp\\screenshot.png", os.Getenv("USERPROFILE"))
66
67
+ } else {
68
+ save = fmt.Sprintf("%s\\AppData\\Local\\Temp\\screenshot.png", os.Getenv("HOME"))
69
70
+ }
71
72
case "darwin": panic("Darwin not yet implemented.")
73
}
74
0 commit comments