diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-11-04 21:24:48 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-11-04 21:24:48 +0100 |
commit | ad4de52510d5b4a949c0c9e25b5d5333744820b3 (patch) | |
tree | 4eb4213efcb667a4f227baaa1b1351b1f43a9519 /runtime | |
parent | 2ade714728ff824f67a9a24ef495d509a389ee2f (diff) | |
download | vim-git-ad4de52510d5b4a949c0c9e25b5d5333744820b3.tar.gz |
patch 8.1.2253: using "which" to check for an executable is not reliablev8.1.2253
Problem: Using "which" to check for an executable is not reliable.
Solution: Use "command -v" instead. Also exit with error code when
generating tags has an error. (closes #5174)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile index 4ca08818d..e10415f9e 100644 --- a/runtime/doc/Makefile +++ b/runtime/doc/Makefile @@ -323,9 +323,9 @@ all: tags vim.man evim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED) # Use Vim to generate the tags file. Can only be used when Vim has been # compiled and installed. Supports multiple languages. vimtags: $(DOCS) - @if which $(VIMEXE) >/dev/null; then \ - $(VIMEXE) --clean -eX -u doctags.vim >/dev/null; \ - echo "help tags updated"; \ + @if command -v $(VIMEXE); then \ + $(VIMEXE) --clean -eX -u doctags.vim >/dev/null && \ + echo "help tags updated"; \ else echo "vim executable $(VIMEXE) not found; help tags not updated"; fi # Use "doctags" to generate the tags file. Only works for English! |