aboutsummaryrefslogtreecommitdiff
path: root/scripts/vim-patch.sh
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-02-08 10:07:00 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-02-08 10:08:17 +0800
commit4d349330a7bbaa66512fd5ac359a5d761101e774 (patch)
tree3af1898650dfae3d1befd5c726687f3804b8ad4e /scripts/vim-patch.sh
parent0a8bfc0214b3dc2a1bdeb4452884fbd26c0de906 (diff)
downloadrneovim-4d349330a7bbaa66512fd5ac359a5d761101e774.tar.gz
rneovim-4d349330a7bbaa66512fd5ac359a5d761101e774.tar.bz2
rneovim-4d349330a7bbaa66512fd5ac359a5d761101e774.zip
chore(vim-patch.sh): use piping instead of here string for `while read`
Using a here string can cause an error if there are no missing patches: `./scripts/vim-patch.sh: line 580: runtime_commits: bad array subscript` Using piping doesn't cause the error.
Diffstat (limited to 'scripts/vim-patch.sh')
-rwxr-xr-xscripts/vim-patch.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh
index 1c265f0f40..67a2cc96fd 100755
--- a/scripts/vim-patch.sh
+++ b/scripts/vim-patch.sh
@@ -576,13 +576,13 @@ show_vimpatches() {
runtime_commits[$commit]=1
done
- while read -r vim_commit; do
+ list_missing_vimpatches 1 "$@" | while read -r vim_commit; do
if [[ "${runtime_commits[$vim_commit]-}" ]]; then
printf ' • %s (+runtime)\n' "${vim_commit}"
else
printf ' • %s\n' "${vim_commit}"
fi
- done <<< "$(list_missing_vimpatches 1 "$@")"
+ done
cat << EOF