diff --git a/tools/pm3_tests.sh b/tools/pm3_tests.sh index c142714b4..765e868bd 100755 --- a/tools/pm3_tests.sh +++ b/tools/pm3_tests.sh @@ -216,11 +216,13 @@ if [ "$TRAVIS_COMMIT" ]; then fi fi -echo -n "git branch: " -git describe --all -echo -n "git sha: " -git rev-parse HEAD -echo "" +if command -v git >/dev/null && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then + echo -n "git branch: " + git describe --all + echo -n "git sha: " + git rev-parse HEAD + echo "" +fi while true; do if $TESTALL || $TESTCOMMON; then