Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ or globally, with the following priority:

1. `.crush.json`
2. `crush.json`
3. `$HOME/.config/crush/crush.json` (Windows: `%USERPROFILE%\AppData\Local\crush\crush.json`)
3. `$HOME/.config/crush/crush.json`

Configuration itself is stored as a JSON object:

Expand Down
11 changes: 0 additions & 11 deletions internal/config/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,17 +662,6 @@ func GlobalConfig() string {
return filepath.Join(xdgConfigHome, appName, fmt.Sprintf("%s.json", appName))
}

// return the path to the main config directory
// for windows, it should be in `%LOCALAPPDATA%/crush/`
// for linux and macOS, it should be in `$HOME/.config/crush/`
if runtime.GOOS == "windows" {
localAppData := os.Getenv("LOCALAPPDATA")
if localAppData == "" {
localAppData = filepath.Join(os.Getenv("USERPROFILE"), "AppData", "Local")
}
return filepath.Join(localAppData, appName, fmt.Sprintf("%s.json", appName))
}

return filepath.Join(home.Dir(), ".config", appName, fmt.Sprintf("%s.json", appName))
}

Expand Down
Loading