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

Please respect WAKATIME_HOME environment variable #252

Open
ivuorinen opened this issue Apr 7, 2023 · 4 comments
Open

Please respect WAKATIME_HOME environment variable #252

ivuorinen opened this issue Apr 7, 2023 · 4 comments

Comments

@ivuorinen
Copy link

Currently setting WAKATIME_HOME env variable is being ignored, causing there to be two sets of configurations.

The best would be to support XDG Base Directory Specification if user has made it possible. Here's a nicer to read spec and examples of applications using it.

@alanhamlett
Copy link
Member

We're working towards using XDG base directory with wakatime/wakatime-cli#558.

For now, I'll release a new version of jetbrains-wakatime today supporting $WAKATIME_HOME.

@alanhamlett
Copy link
Member

Turns out we're already reading and using $WAKATIME_HOME if it's available to the jetbrains IDE process:

if (System.getenv("WAKATIME_HOME") != null && !System.getenv("WAKATIME_HOME").trim().isEmpty()) {

if (System.getenv("WAKATIME_HOME") != null && !System.getenv("WAKATIME_HOME").trim().isEmpty()) {

How are you setting that env var and making it available to the ide?

@ivuorinen
Copy link
Author

ivuorinen commented Jun 16, 2023

All of zsh (my default), sh and bash echo the $WAKATIME_HOME to one I've set (~/.local/state/wakatime), and after deleting the files (~/.wakatime.cfg, ~/.wakatime-internal.cfg) and relaunching PHPStorm it asks for the API key and the files appear again to the root of my homedir.

Is there a special way I should make PHPStorm aware of the env settings?

@corruptmane
Copy link

Issue still persists. I also checked Run/Debug configurations to see system-wide env variables that my IDE (PyCharm) can see, and I see WAKATIME_HOME variable there, but PyCharm (or should I say WakaTime plugin) still asks me to enter API_KEY and automatically creates .wakatime.cfg file as well as .wakatime directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants