wakatime / sublime-wakatime

Sublime Text 2 & 3 plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/sublime-text
BSD 3-Clause "New" or "Revised" License
526 stars 45 forks source link

Disable api key prompt if already set in main config #98

Closed soifou closed 5 years ago

soifou commented 5 years ago

I'm using only the main config file (.wakatime.cfg) to set my api_key and some other settings I need for. I don't need to set any overriden value in Wakatime.sublime-settings.

However each time I open a new Sublime Text instance, Wakatime prompt me to enter my api key even if it does not prevent it from working as it should. So each time, I hit escape key to skip the prompt but this is kind of annoying.

Could you implement an option to not prompt for an api_key or review the logic behind this ? If this is not intended, I could give you some additionnal informations about my setup.

alanhamlett commented 5 years ago

Implemented in v8.6.0 just released.

soifou commented 5 years ago

@alanhamlett

Thanks for the fix but it does still prompt with v8.6.0 :/ My WAKATIME_HOME is set to ~/.config/wakatime My wakatime config ~/.config/wakatime/.wakatime.cfg No user defined Wakatimesublime-settings

alanhamlett commented 5 years ago

Sorry, probably because of a bug when parsing the config file. Should be fixed now in 8.6.1, can u see if it stops prompting after updating?

soifou commented 5 years ago

The behaviour has changed.

Now, first time it continues prompting and creates a sublime-settings file with my api_key. The next time it stops prompting.

I don't want or need to manage several config files for my api key.

alanhamlett commented 5 years ago

After upgrading to v8.7.0 you can delete your user sublime-settings file and restart Sublime for it to use the common config file without re-creating the sublime-settings file.

soifou commented 5 years ago

Yes this is now perfect, thanks a lot @alanhamlett !