Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug fix: Respect 'lua_interpreter_path' during search path discovery

  • Loading branch information...
commit aa7a64257fb661875668b31ca8e6c1354aad9171 1 parent 090371f
@xolox authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 autoload/xolox/lua.vim
View
4 autoload/xolox/lua.vim
@@ -42,7 +42,9 @@ function! xolox#lua#getsearchpath(envvar, luavar) " {{{1
call xolox#misc#msg#debug("lua.vim %s: Got %s from %s", g:xolox#lua#version, a:luavar, a:envvar)
else
try
- let path = xolox#misc#os#exec({'command': 'lua -e "io.write(' . a:luavar . ')"'})['stdout'][0]
+ let interpreter = xolox#misc#escape#shell(xolox#misc#option#get('lua_interpreter_path', 'lua'))
+ let command = printf('%s -e "io.write(%s)"', interpreter, a:luavar)
+ let path = xolox#misc#os#exec({'command': command})['stdout'][0]
call xolox#misc#msg#debug("lua.vim %s: Got %s from external Lua interpreter", g:xolox#lua#version, a:luavar)
catch
call xolox#misc#msg#warn("lua.vim %s: Failed to get %s from external Lua interpreter: %s", g:xolox#lua#version, a:luavar, v:exception)

0 comments on commit aa7a642

Please sign in to comment.
Something went wrong with that request. Please try again.