Kaynağa Gözat

Fix Shellcheck SC2166: test -a is not well defined

Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.

https://github.com/koalaman/shellcheck/wiki/SC2166

Signed-off-by: Dan Callahan <danc@element.io>
tags/v1.47.0rc1
Dan Callahan 2 yıl önce
ebeveyn
işleme
6a9d84a676
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: 5FAD56482D9EB851
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. +1
    -1
      scripts-dev/check-newsfragment

+ 1
- 1
scripts-dev/check-newsfragment Dosyayı Görüntüle

@@ -45,7 +45,7 @@ matched=0
for f in `git diff --name-only FETCH_HEAD... -- changelog.d`; do
# check that any modified newsfiles on this branch end with a full stop.
lastchar=`tr -d '\n' < $f | tail -c 1`
if [ $lastchar != '.' -a $lastchar != '!' ]; then
if [ $lastchar != '.' ] && [ $lastchar != '!' ]; then
echo -e "\e[31mERROR: newsfragment $f does not end with a '.' or '!'\e[39m" >&2
echo -e "$CONTRIBUTING_GUIDE_TEXT" >&2
exit 1


Yükleniyor…
İptal
Kaydet