Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow XDG Base Directory Specificatoin #556

Open
bigodel opened this issue Apr 25, 2024 · 0 comments
Open

Follow XDG Base Directory Specificatoin #556

bigodel opened this issue Apr 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@bigodel
Copy link

bigodel commented Apr 25, 2024

The problem

Since version 1.7.45, AWS CLI allows the user to specify the location of the configuration and credentials files through environment variables. I'd like for Leapp to follow this convention as well.

The solution

I think this wouldn't be hard to implement, we'd just need to use a library like xdg-basedir in either the implementation of INativeService or in AwsCoreService. I could try and get a PR, but I don't know if I can make it in a timely manner, plus I'm not really a Node developer.

Additional context

There is a caveat for macOS. As it says on the first line of the linked Node library, macOS doesn't really follow XDG by default, and instead puts stuff under ~/Library. We could get the values for macOS with the suggested library, env-paths, but I'd argue that supporting XDG on macOS is highly desirable as well, as many would rather use that (specially those, like me, who juggle dotfiles between a Mac and a Linux machine). It might not be trivial to do that since there is no default way to set XDG_* variables system-wide on login for Mac (on Linux, your Xorg session will source your ~/.profile or whatever equivalent of it you have when you first login into the system, and only then. On macOS, that gets sourced, by default, by every new terminal window you spawn, as if you're logging in every time you open a terminal).

I suppose this would only be an issue for the GUI app. The CLI should pick up the variables if the user set them correctly.

@bigodel bigodel added the enhancement New feature or request label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant