tools: improve detection of "ci-fairy" command in "tools/check-gitlab-ci.sh"

The previous implementation would print

    ./tools/check-gitlab-ci.sh: line 22: ci-fairy: command not found

also, it's not nice to execute the program, just to find out whether
we have it.
This commit is contained in:
Thomas Haller 2020-12-11 11:05:10 +01:00
parent 3c39ab8836
commit b9d4026f85
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -23,7 +23,7 @@ if ! [ -f ./.gitlab-ci.yml ] ; then
exit 0
fi
if ! ci-fairy --help 2>&1 >/dev/null ; then
if ! command -v ci-fairy &> /dev/null ; then
# ci-fairy not available. Cannot check.
exit 0
fi