wakatime / atom-wakatime

Atom plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/atom
BSD 3-Clause "New" or "Revised" License
318 stars 30 forks source link

atom-wakatime does not respect WAKATIME_HOME #94

Closed khaeru closed 4 years ago

khaeru commented 4 years ago
  1. In working around #90, I set the WAKATIME_HOME environment variable to a directory like $HOME/.local/share/wakatime. At the same time, I moved .wakatime.cfg, .wakatime.db, .wakatime.log into this directory.
  2. When I next started Atom, I saw an error message that my API key was not found.
  3. In the Atom settings view, I re-entered my API key.
  4. I noticed the file $HOME/.wakatime.cfg was created, while $WAKATIME_HOME/.wakatime.cfg was not modified.

It seems that when atom-wakatime invokes the wakatime Python core, the latter correctly picks up WAKATIME_HOME, so that the .db and .log files are modified in the correct directory. But the Atom plugin reads and writes the .cfg file in the wrong place. Searching the code in this repo shows that the environment variable is not used.

For now I work around this issue with a symlink:

$ ln -s $HOME/.local/share/wakatime/.wakatime.cfg $HOME/.wakatime.cfg