mirror of
https://github.com/FiloSottile/mkcert.git
synced 2025-10-14 00:41:40 +08:00
Fix getCAROOT switch statement
This commit is contained in:
10
main.go
10
main.go
@@ -137,12 +137,12 @@ func getCAROOT() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var dir string
|
var dir string
|
||||||
switch runtime.GOOS {
|
switch {
|
||||||
case "windows":
|
case runtime.GOOS == "windows":
|
||||||
dir = os.Getenv("LocalAppData")
|
dir = os.Getenv("LocalAppData")
|
||||||
case env = os.Getenv("XDG_DATA_HOME"); env != "":
|
case os.Getenv("XDG_DATA_HOME") != "":
|
||||||
dir = env
|
dir = os.Getenv("XDG_DATA_HOME")
|
||||||
case "darwin":
|
case runtime.GOOS == "darwin":
|
||||||
dir = os.Getenv("HOME")
|
dir = os.Getenv("HOME")
|
||||||
if dir == "" {
|
if dir == "" {
|
||||||
return ""
|
return ""
|
||||||
|
Reference in New Issue
Block a user