Skip to content

Commit d418de0

Browse files
committed
Treat any yapf exit code as an error case, not just exit code 1
Fixes #61.
1 parent 9346c38 commit d418de0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/codefmt/yapf.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function! codefmt#yapf#GetFormatter() abort
4949
let l:input = join(l:lines, "\n")
5050

5151
let l:result = maktaba#syscall#Create(l:cmd).WithStdin(l:input).Call(0)
52-
if v:shell_error == 1 " Indicates an error with parsing
52+
if v:shell_error
5353
call maktaba#error#Shout('Error formatting file: %s', l:result.stderr)
5454
return
5555
endif

0 commit comments

Comments
 (0)