#540 Fix shell escaping pretty much everywhere
This commit is contained in:
parent
28c6ec9cad
commit
6ea00af689
37 changed files with 85 additions and 87 deletions
|
@ -10,7 +10,7 @@ function! ale_linters#cpp#clang#GetCommand(buffer) abort
|
|||
" -iquote with the directory the file is in makes #include work for
|
||||
" headers in the same directory.
|
||||
return 'clang++ -S -x c++ -fsyntax-only '
|
||||
\ . '-iquote ' . fnameescape(fnamemodify(bufname(a:buffer), ':p:h'))
|
||||
\ . '-iquote ' . shellescape(fnamemodify(bufname(a:buffer), ':p:h'))
|
||||
\ . ' ' . ale#Var(a:buffer, 'cpp_clang_options') . ' -'
|
||||
endfunction
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ function! ale_linters#cpp#gcc#GetCommand(buffer) abort
|
|||
" -iquote with the directory the file is in makes #include work for
|
||||
" headers in the same directory.
|
||||
return 'gcc -S -x c++ -fsyntax-only '
|
||||
\ . '-iquote ' . fnameescape(fnamemodify(bufname(a:buffer), ':p:h'))
|
||||
\ . '-iquote ' . shellescape(fnamemodify(bufname(a:buffer), ':p:h'))
|
||||
\ . ' ' . ale#Var(a:buffer, 'cpp_gcc_options') . ' -'
|
||||
endfunction
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue