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

Support reading api-key from vault command #150

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

gandarez
Copy link
Member

This PR makes vim to also read from vault command if present.

wakatime/wakatime-cli#783 (comment)

@gandarez gandarez self-assigned this Nov 24, 2022
@@ -6,7 +6,7 @@
" Website: https://wakatime.com/
" ============================================================================

let s:VERSION = '9.0.1'
let s:VERSION = '9.1.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not mix version bumps with code changes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it to test locally and forgot to rollback :(


if !found_api_key
let vault_cmd = s:GetIniSetting('settings', 'api_key_vault_cmd')
if vault_cmd != ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if !empty(vault_cmd)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a guideline to use empty function? There are other lines of code that's not using it, like

if s:GetIniSetting('settings', 'api_key') != '' || s:GetIniSetting('settings', 'apikey') != ''

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's just legacy code, we can change it to also use empty later.

Copy link
Member

@alanhamlett alanhamlett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remove the version bump and it's good to merge.

@alanhamlett alanhamlett merged commit a2c0e31 into master Nov 25, 2022
@alanhamlett alanhamlett deleted the feature/api-key-vault-cmd branch November 25, 2022 00:51
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

Successfully merging this pull request may close these issues.

2 participants