mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-09 03:54:52 +08:00
Use shellescape with system call
This properly escapes the shell argument on Windows. `cmd.exe` would strip off the first and last quote on a command. Closes https://github.com/davidhalter/jedi-vim/pull/443/files.
This commit is contained in:
@@ -70,7 +70,7 @@ function! s:init_python()
|
|||||||
" avoids starting both of them.
|
" avoids starting both of them.
|
||||||
|
|
||||||
" Get default python version from interpreter in $PATH.
|
" Get default python version from interpreter in $PATH.
|
||||||
let s:def_py = system("python -c 'import sys; sys.stdout.write(str(sys.version_info[0]))'")
|
let s:def_py = system('python -c '.shellescape('import sys; sys.stdout.write(str(sys.version_info[0]))'))
|
||||||
if v:shell_error != 0 || !len(s:def_py)
|
if v:shell_error != 0 || !len(s:def_py)
|
||||||
if !exists("g:jedi#squelch_py_warning")
|
if !exists("g:jedi#squelch_py_warning")
|
||||||
echohl WarningMsg
|
echohl WarningMsg
|
||||||
|
|||||||
Reference in New Issue
Block a user