mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:50:05 +08:00
fix(alternative): fix a.vim and a.lua
This commit is contained in:
parent
a98b324a01
commit
43f7c8f78a
@ -68,7 +68,7 @@ else
|
||||
" saving cache
|
||||
|
||||
function! s:cache() abort
|
||||
call writefile([s:JSON.json_encode(s:project_config)], s:FILE.unify_path(s:cache_path, ':p'))
|
||||
silent call writefile([s:JSON.json_encode(s:project_config)], s:FILE.unify_path(s:cache_path, ':p'))
|
||||
endfunction
|
||||
|
||||
function! s:load_cache() abort
|
||||
|
@ -27,11 +27,11 @@ local project_config = {}
|
||||
|
||||
local function cache()
|
||||
logger.debug('write cache into file:' .. cache_path)
|
||||
local rst = fn.writefile({sp_json.json_encode(project_config)}, cache_path)
|
||||
if rst == 0 then
|
||||
logger.debug('cache succeeded!')
|
||||
else
|
||||
local ok, errors = pcall(fn.writefile, {sp_json.json_encode(project_config)}, cache_path)
|
||||
if not ok then
|
||||
logger.debug('cache failed!')
|
||||
else
|
||||
logger.debug('cache succeeded!')
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user