From 1bec4666f2fd1f99bff6a02b9aebb11ce9046f6f Mon Sep 17 00:00:00 2001 From: Brandon Rhodes Date: Thu, 9 Jul 2020 15:02:52 -0400 Subject: [PATCH] Fix CI: only run pyflakes if already installed --- test-code.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-code.sh b/test-code.sh index f413e3b..a5b1b08 100755 --- a/test-code.sh +++ b/test-code.sh @@ -16,9 +16,9 @@ to install all of the tools and libraries for Skyfield development. EOF exit 2 fi -if python --version | grep -q 'Python 3.6' +if python --version | grep -q 'Python 3.6' && command -v pyflakes >/dev/null then d=$(python -c 'import skyfield as s; print(s.__file__.rsplit("/", 1)[0])') - pyflakes "$d"/*.py "$d"/data/*.py + pyflakes $(find "$d" -name '*.py') fi exec assay --batch skyfield.tests