xo / usql

Universal command-line interface for SQL databases
MIT License
9.08k stars 352 forks source link

Request/Discussion - Config Location for macOS #487

Closed exastone closed 1 month ago

exastone commented 1 month ago

convention for dev tools config files on macOS is same as linux i.e. $HOME/.config/.

use of os.UserConfigDir() yields "$HOME/Library/Application Support" see: https://github.com/xo/usql/blob/8519ebd9888c5120eb9e757e3a37914c7d04157e/env/types.go#L703

i believe the switch-case in buildConfigDir() is redundant as this copies functionality of os.UserConfigDir() see: https://github.com/xo/usql/blob/master/env/types.go#L706


Happy to submit a PR if i can get an idea of what is the desired outcome here. if config dir isn't found what is the desired action. also, realpath is used in buildConfigDir() but i don't see an obvious purpose.

Open to discuss this,

kenshaw commented 1 month ago

This was done on purpose so that the command help would have both the expanded path and the relevant home path. We're always open to well written PRs.