]> granicus.if.org Git - vim/commitdiff
patch 8.1.2253: using "which" to check for an executable is not reliable v8.1.2253
authorBram Moolenaar <Bram@vim.org>
Mon, 4 Nov 2019 20:24:48 +0000 (21:24 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 4 Nov 2019 20:24:48 +0000 (21:24 +0100)
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)

runtime/doc/Makefile
src/version.c

index 4ca08818dd30572cc1f902f38f84058bcc4335cf..e10415f9efcd301d4e1f09ab12eacab338d808ab 100644 (file)
@@ -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!
index 9b4c386a4b493c07601192e9b5ae7a6a1dec201c..2a09818a30c8a6eae4d39e4cac79dce013f522dc 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2253,
 /**/
     2252,
 /**/