mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-04-08 19:35:31 +02:00
check for existence of git/hg before calling them
This commit is contained in:
parent
f706edee9f
commit
c39e5f82cc
@ -71,7 +71,7 @@ function! s:get_git_branch(path)
|
||||
endfunction
|
||||
|
||||
function! s:get_git_untracked(file)
|
||||
if empty(a:file)
|
||||
if empty(a:file) || !executable('git')
|
||||
return
|
||||
endif
|
||||
if !has_key(s:untracked_git, a:file)
|
||||
@ -88,7 +88,7 @@ function! s:get_git_untracked(file)
|
||||
endfunction
|
||||
|
||||
function! s:get_hg_untracked(file)
|
||||
if !s:has_lawrencium && empty(a:file)
|
||||
if !s:has_lawrencium || empty(a:file) || !executable('hg')
|
||||
return
|
||||
endif
|
||||
" delete cache when unlet b:airline head?
|
||||
|
Loading…
x
Reference in New Issue
Block a user