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:
@@ -23,7 +23,7 @@ if ! [ -f ./.gitlab-ci.yml ] ; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! ci-fairy --help 2>&1 >/dev/null ; then
|
if ! command -v ci-fairy &> /dev/null ; then
|
||||||
# ci-fairy not available. Cannot check.
|
# ci-fairy not available. Cannot check.
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user