Переглянути джерело

Fix `show-version` error on multiline version text

For some reason, `vim --version | head -n 1` generates a failure in
CentOS 5. Works without `-n 1`. I also cannot catch any return errors
with `$?` to find out more. Either way, that line should always be
considered a pass, so we add the standard bash-strict-mode `|| true` to
ignore the error.
Weiyi Lou 10 роки тому
батько
коміт
a31028e912
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      bin/show-versions

+ 1 - 1
bin/show-versions

@@ -22,7 +22,7 @@ version_commands=( \
 for ver_com in ${version_commands[@]}; do
   com=${ver_com%% *}
   if [[ -n $(command -v $com) ]]; then
-    eval "$ver_com" | head -n 1
+    eval "$ver_com" | head -n 1 || true
   else
     echo "$com - none"
   fi