Skip to content

Commit

Permalink
Fix getCAROOT switch statement
Browse files Browse the repository at this point in the history
  • Loading branch information
FiloSottile committed Jul 7, 2018
1 parent dbad5f8 commit b0f7a80
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down

0 comments on commit b0f7a80

Please sign in to comment.