From 84cb742b9a5327ad47f546f20b77f9407a683264 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 10 Mar 2024 22:43:51 +0800 Subject: [PATCH] fix(pmd): check executable of Pmd_Cmd --- autoload/SpaceVim/plugins/pmd.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autoload/SpaceVim/plugins/pmd.vim b/autoload/SpaceVim/plugins/pmd.vim index a03164408..3a18d6f00 100644 --- a/autoload/SpaceVim/plugins/pmd.vim +++ b/autoload/SpaceVim/plugins/pmd.vim @@ -92,6 +92,12 @@ endfunction " @vimlint(EVL103, 0, a:event) function! SpaceVim#plugins#pmd#run(...) abort + if !executable(g:Pmd_Cmd[0]) + echohl WarningMsg + echo g:Pmd_Cmd[0] .. ' is not executable' + echohl None + return + endif let argv = g:Pmd_Cmd + a:000 if index(a:000, '-R') == -1 let argv += g:Pmd_Rulesets