Skip to content

Commit

Permalink
feat: dirs for darwin support
Browse files Browse the repository at this point in the history
  • Loading branch information
budak7273 committed Aug 14, 2024
1 parent 2865004 commit a268f80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ func init() {
baseLocalDir = os.Getenv("APPDATA")
case "linux":
baseLocalDir = filepath.Join(os.Getenv("HOME"), ".local", "share")
case "darwin":
baseLocalDir = filepath.Join(os.Getenv("HOME"), "Library", "Application Support")
default:
panic("unsupported platform: " + runtime.GOOS)
}
Expand Down
2 changes: 2 additions & 0 deletions tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ func main() {
baseLocalDir = os.Getenv("APPDATA")
case "linux":
baseLocalDir = filepath.Join(os.Getenv("HOME"), ".local", "share")
case "darwin":
baseLocalDir = filepath.Join(os.Getenv("HOME"), "Library", "Application Support")
default:
panic("unsupported platform: " + runtime.GOOS)
}
Expand Down

0 comments on commit a268f80

Please sign in to comment.