From 4948f25e003f173c67682712f17df04bad88ab55 Mon Sep 17 00:00:00 2001 From: Tycho Andersen Date: Tue, 4 Oct 2016 23:40:37 -0600 Subject: [PATCH] make godeps check conditional on godeps existing Signed-off-by: Tycho Andersen --- test/suites/static_analysis.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/suites/static_analysis.sh b/test/suites/static_analysis.sh index b506a9ce4b76..ae8785642e48 100644 --- a/test/suites/static_analysis.sh +++ b/test/suites/static_analysis.sh @@ -47,10 +47,12 @@ test_static_analysis() { done fi - OUT=$(godeps . ./shared | cut -f1) - if [ "${OUT}" != "$(printf "github.com/gorilla/websocket\ngopkg.in/yaml.v2\n")" ]; then - echo "ERROR: you added a new dependency to the client or shared; please make sure this is what you want" - echo "${OUT}" + if which godeps >/dev/null 2>&1; then + OUT=$(godeps . ./shared | cut -f1) + if [ "${OUT}" != "$(printf "github.com/gorilla/websocket\ngopkg.in/yaml.v2\n")" ]; then + echo "ERROR: you added a new dependency to the client or shared; please make sure this is what you want" + echo "${OUT}" + fi fi # Skip the tests which require git