httpx/scripts/test
Tom Christie 51b70b3fca
If scripts/check fails then prompt and autofix. (#952)
* If scripts/check fails then prompt and autofix

* Update scripts/test

Co-authored-by: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com>

* Update test

Co-authored-by: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com>
2020-05-15 13:22:46 +01:00

25 lines
436 B
Bash
Executable File

#!/bin/sh
export PREFIX=""
if [ -d 'venv' ] ; then
export PREFIX="venv/bin/"
fi
if [ -z $GITHUB_ACTIONS ]; then
set +e
scripts/check
while [ $? -ne 0 ]; do
read -p "Running 'scripts/check' failed. Do you want to run 'scripts/lint' now? [y/N] " yn
case $yn in
[Yy]* ) :;;
* ) exit;;
esac
scripts/lint
scripts/check
done
fi
set -ex
${PREFIX}pytest $@