Do not emit a warning about symlinks when it is not the problem
This commit is contained in:
parent
dcf442e86f
commit
e316c81f1d
|
@ -62,11 +62,13 @@ endfunction
|
|||
try
|
||||
let s:can_replace_pyeval = !exists('g:powerline_pyeval')
|
||||
call s:rcmd("try:")
|
||||
call s:rcmd(" powerline_appended_path = None")
|
||||
call s:rcmd(" try:")
|
||||
call s:rcmd(" ".s:import_cmd."")
|
||||
call s:rcmd(" except ImportError:")
|
||||
call s:rcmd(" import sys, vim")
|
||||
call s:rcmd(" sys.path.append(vim.eval('expand(\"<sfile>:h:h:h:h:h\")'))")
|
||||
call s:rcmd(" powerline_appended_path = vim.eval('expand(\"<sfile>:h:h:h:h:h\")')")
|
||||
call s:rcmd(" sys.path.append(powerline_appended_path)")
|
||||
call s:rcmd(" ".s:import_cmd."")
|
||||
call s:rcmd(" import vim")
|
||||
call s:rcmd(" VimPowerline().setup(pyeval=vim.eval('s:pyeval'), pycmd=vim.eval('s:pycmd'), can_replace_pyeval=int(vim.eval('s:can_replace_pyeval')))")
|
||||
|
@ -118,9 +120,10 @@ finally
|
|||
call s:rcmd(" this_dir = os.path.dirname(this_dir)")
|
||||
call s:rcmd(" real_powerline_dir = os.path.realpath(powerline_dir)")
|
||||
call s:rcmd(" real_this_dir = os.path.realpath(this_dir)")
|
||||
call s:rcmd(" if real_this_dir != sys.path[-1]:")
|
||||
call s:rcmd(" if powerline_appended_path is not None and real_this_dir != powerline_appended_path:")
|
||||
call s:rcmd(" print('Check your installation: this script is symlinked somewhere')")
|
||||
call s:rcmd(" print('where powerline is not present.')")
|
||||
call s:rcmd(" print('where powerline is not present: {0!r} != {1!r}.'.format(")
|
||||
call s:rcmd(" real_this_dir, sys.path[-1]))")
|
||||
call s:rcmd(" elif real_powerline_dir != real_this_dir:")
|
||||
call s:rcmd(" print('It appears that you have two powerline versions installed:')")
|
||||
call s:rcmd(" print('one in ' + real_powerline_dir + ', other in ' + real_this_dir + '.')")
|
||||
|
|
Loading…
Reference in New Issue