Skip to content

Commit

Permalink
Fix 3546 - check empty executable string.
Browse files Browse the repository at this point in the history
At some point VIM/NVIM started throwing errors if the input string is
empty for some functions such as execute() and fnamemodify(). This
commit checks if the executable string is empty before passing it to the
executable() function.

Resources:
  - vim/vim#7465
  - https://github.com/vim/vim/releases/tag/v8.2.2117
  • Loading branch information
hsanson committed Jan 22, 2021
1 parent 9a1e91e commit 53ff5f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/ale/maven.vim
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function! ale#maven#FindExecutable(buffer) abort
let l:wrapper_cmd = has('unix') ? 'mvnw' : 'mvnw.cmd'
let l:wrapper_path = ale#path#FindNearestFile(a:buffer, l:wrapper_cmd)

if executable(l:wrapper_path)
if !empty(l:wrapper_path) && executable(l:wrapper_path)
return l:wrapper_path
endif

Expand Down

0 comments on commit 53ff5f2

Please sign in to comment.