mirror of
https://github.com/FiloSottile/mkcert.git
synced 2025-10-13 16:31:41 +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
|
||||
switch runtime.GOOS {
|
||||
case "windows":
|
||||
switch {
|
||||
case runtime.GOOS == "windows":
|
||||
dir = os.Getenv("LocalAppData")
|
||||
case env = os.Getenv("XDG_DATA_HOME"); env != "":
|
||||
dir = env
|
||||
case "darwin":
|
||||
case os.Getenv("XDG_DATA_HOME") != "":
|
||||
dir = os.Getenv("XDG_DATA_HOME")
|
||||
case runtime.GOOS == "darwin":
|
||||
dir = os.Getenv("HOME")
|
||||
if dir == "" {
|
||||
return ""
|
||||
|
Reference in New Issue
Block a user