Merge pull request #1287 from wking/lint-command-check

.tool/lint: Use 'command -v' to detect LINTER presence
This commit is contained in:
Mrunal Patel 2018-01-25 18:09:05 -08:00 committed by GitHub
commit d2f07f7359
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -5,10 +5,10 @@ set -o nounset
set -o pipefail
# Create the linter path for use later
LINTER=${GOPATH}/bin/gometalinter
LINTER="${LINTER:-${GOPATH}/bin/gometalinter}"
# Make sure gometalinter is installed
if [ ! -f ${LINTER} ]; then
if ! command -v ${LINTER} >/dev/null 2>/dev/null; then
echo >&2 "gometalinter must be installed. Please run 'make install.tools' and try again"
exit 1
fi