acquia / cli

Command-line interface for Acquia Cloud Platform products
https://docs.acquia.com/acquia-cli/
GNU General Public License v2.0
42 stars 47 forks source link

CLI-1271: Fix XDG Base Dir implementation #1682

Open danepowell opened 6 months ago

danepowell commented 6 months ago

Our XDG Base Dir implementation isn't quite right. If $HOME/.acquia doesn't exist and $XDG_CONFIG_HOME is unset, ACLI will create the new config directory at $HOME/.config/acquia. But this is very Linux-centric. On MacOS and Windows, there are more appropriate directories (e.g., $HOME/Library/Application Support and LocalAppData).

We should fix this by using an existing XDG Base Dir implementation: https://github.com/php-xdg/base-directory

The problem is if we fix this now, it will break folks who've already adopted the new location on MacOS and Windows. So we need to maintain backwards compatibility with both legacy locations, or else have a major release and BC-break.