vim-patch.sh: fix "unbound variable" error with Bash < 4.4 [ci skip] (#10917)

Ref: https://github.com/neovim/neovim/pull/10888#issuecomment-526774032
This commit is contained in:
Daniel Hahler
2019-09-03 10:12:02 +02:00
committed by GitHub
parent 6434a0bf99
commit d000f02bc0

View File

@@ -430,6 +430,7 @@ list_missing_vimpatches() {
--shell) --shell)
)" )"
# Exit in case of errors from the above eval (empty vim_commit_tags). # Exit in case of errors from the above eval (empty vim_commit_tags).
if ! (( "${#vim_commit_tags[@]}" )); then
msg_err "Could not get Vim commits/tags." msg_err "Could not get Vim commits/tags."
exit 1 exit 1
fi fi
@@ -449,6 +450,7 @@ list_missing_vimpatches() {
patch_number="vim-patch:${vim_tag:1}" # "v7.4.0001" => "7.4.0001" patch_number="vim-patch:${vim_tag:1}" # "v7.4.0001" => "7.4.0001"
if [[ "${tokens[$patch_number]-}" ]]; then if [[ "${tokens[$patch_number]-}" ]]; then
continue continue
fi
echo "$vim_tag" echo "$vim_tag"
else else
echo "$vim_commit" echo "$vim_commit"