Skip to content

Commit

Permalink
Fix jsonnetfmt passing junk "-path" argument (#232)
Browse files Browse the repository at this point in the history
Fixes #231.
  • Loading branch information
dbarnett committed Nov 24, 2023
2 parents 22e551a + 1339fa5 commit c6730fb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions autoload/codefmt/jsonnetfmt.vim
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ function! codefmt#jsonnetfmt#GetFormatter() abort
" Reformat the current buffer with jsonnetfmt or the binary named in
" @flag(jsonnetfmt_executable)
function l:formatter.Format() abort
let l:cmd = [ s:plugin.Flag('jsonnetfmt_executable') ]
let l:fname = expand('%:p')
if !empty(l:fname)
let l:cmd += ['-path', l:fname]
endif
let l:cmd = [ s:plugin.Flag('jsonnetfmt_executable'), '-' ]

try
" NOTE: Ignores any line ranges given and formats entire buffer.
Expand Down

0 comments on commit c6730fb

Please sign in to comment.