Skip to content

Commit 19d5b33

Browse files
b8591340da-x
authored andcommitted
Escape rustfmt config path
1 parent c28ed1b commit 19d5b33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/rustfmt.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ endfunction
6363
function! s:RustfmtConfigOptions()
6464
let l:rustfmt_toml = findfile('rustfmt.toml', expand('%:p:h') . ';')
6565
if l:rustfmt_toml !=# ''
66-
return '--config-path '.fnamemodify(l:rustfmt_toml, ":p")
66+
return '--config-path '.shellescape(fnamemodify(l:rustfmt_toml, ":p"))
6767
endif
6868

6969
let l:_rustfmt_toml = findfile('.rustfmt.toml', expand('%:p:h') . ';')
7070
if l:_rustfmt_toml !=# ''
71-
return '--config-path '.fnamemodify(l:_rustfmt_toml, ":p")
71+
return '--config-path '.shellescape(fnamemodify(l:_rustfmt_toml, ":p"))
7272
endif
7373

7474
" Default to edition 2018 in case no rustfmt.toml was found.

0 commit comments

Comments
 (0)