mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 01:09:56 +08:00
fix(issue): use systemlist instead to avoid CR LF
This commit is contained in:
parent
f4997db25d
commit
d518040658
@ -113,12 +113,16 @@ function! s:spacevim_version() abort
|
|||||||
let pwd = getcwd()
|
let pwd = getcwd()
|
||||||
try
|
try
|
||||||
exe 'cd ' . fnamemodify(g:_spacevim_root_dir, ':p:h')
|
exe 'cd ' . fnamemodify(g:_spacevim_root_dir, ':p:h')
|
||||||
let status = s:CMP.system('git rev-parse --short HEAD')
|
let status = s:CMP.systemlist('git rev-parse --short HEAD')
|
||||||
catch
|
catch
|
||||||
exe 'cd ~/.SpaceVim'
|
exe 'cd ~/.SpaceVim'
|
||||||
let status = s:CMP.system('git rev-parse --short HEAD')
|
let status = s:CMP.systemlist('git rev-parse --short HEAD')
|
||||||
endtry
|
endtry
|
||||||
exe 'cd ' . pwd
|
exe 'cd ' . pwd
|
||||||
return s:STR.trim(status)
|
if type(status) == 3
|
||||||
|
return s:STR.trim(join(status))
|
||||||
|
else
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user