remove code to check for api key in config file, will add back in a separate commit for readability

This commit is contained in:
Alan Hamlett 2015-05-03 09:52:33 -07:00
parent a7d48d3507
commit d5d66daa53

View file

@ -74,22 +74,6 @@ let s:VERSION = '4.0.0'
if key != ''
call writefile(['[settings]', 'debug = false', printf("api_key = %s", key), 'hidefilenames = false', 'ignore =', ' COMMIT_EDITMSG$', ' TAG_EDITMSG$'], s:config_file)
endif
" Make sure config file has api_key
else
let found_api_key = 0
let lines = readfile(s:config_file)
for line in lines
let group = split(line, '=')
if len(group) == 2 && s:StripWhitespace(group[0]) == 'api_key' && s:StripWhitespace(group[1]) != ''
let found_api_key = 1
endif
endfor
if !found_api_key
let key = input("[WakaTime] Enter your wakatime.com api key: ")
let lines = lines + [join(['api_key', key], '=')]
call writefile(lines, s:config_file)
endif
endif
let s:config_file_already_setup = 1