-
Notifications
You must be signed in to change notification settings - Fork 445
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
Add support for the XDG directory specification #590
Conversation
I cannot tell what is wrong with this PR. tslint passes locally for me. |
This pull request introduces 1 alert when merging cf92cc4 into 1ee0dbd - view on LGTM.com new alerts:
|
|
||
if (process.env.XDG_CACHE_HOME !== undefined) { | ||
return path.join(process.env.XDG_CACHE_HOME, restClientDir); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question, if an existing user wants to use the XDG directory, he needs to delete the .rest-client
folder first. And they also need to export these two environment variables in shell. right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the user would need to delete it and have the env variables exported. A lot of distributions have these exported by default.
@tristan957 Merged, thanks |
Thanks very much for your review |
@tristan957 You can try this in the latest version 0.24.0 |
Perfect I'll let you know how it goes! |
I am a Linux user.
Linux users hate when people put dotfiles in the HOME folder.
I noticed your awesome extension <3 puts its folder in the HOME folder.
I implemented backwards-compatible support for the XDG directory specification[1].
In the case
~/.rest-client
exists, we continue to use that folder. Otherwise, we use bothXDG_CACHE_HOME/rest-client
andXDG_CONFIG_HOME/rest-client
.So in my case as a previous user, I would just delete the current folder, and have the extension use the paths because I have those variables defined, as do most Linux users.
1: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html