* 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>
-#!/bin/sh -e
+#!/bin/sh
export PREFIX=""
if [ -d 'venv' ] ; then
export PREFIX="venv/bin/"
fi
-set -x
-
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 $@