mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 10:30:05 +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()
|
||||
try
|
||||
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
|
||||
exe 'cd ~/.SpaceVim'
|
||||
let status = s:CMP.system('git rev-parse --short HEAD')
|
||||
let status = s:CMP.systemlist('git rev-parse --short HEAD')
|
||||
endtry
|
||||
exe 'cd ' . pwd
|
||||
return s:STR.trim(status)
|
||||
if type(status) == 3
|
||||
return s:STR.trim(join(status))
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user