cli icon indicating copy to clipboard operation
cli copied to clipboard

CLI-1271: Fix XDG Base Dir implementation

Open danepowell opened this issue 1 year ago • 0 comments

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.

danepowell avatar Feb 12 '24 22:02 danepowell