prevent calling black with non-existant dir
@@ -381,7 +381,9 @@ black: requirements .black-check
echo "Running black on" $$component; \
echo "==========================================================="; \
. $(VIRTUALENV_DIR)/bin/activate ; black --check --config pyproject.toml $$component/ || exit 1; \
+ if [ -d "$$component/bin" ]; then \
. $(VIRTUALENV_DIR)/bin/activate ; black $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
+ fi \
done
# runner modules and packages
@for component in $(COMPONENTS_RUNNERS); do\
@@ -389,7 +391,9 @@ black: requirements .black-check
echo "Running black on" $$component; \
echo "==========================================================="; \
. $(VIRTUALENV_DIR)/bin/activate ; black --check --config pyproject.toml $$component/ || exit 1; \
+ if [ -d "$$component/bin" ]; then \
. $(VIRTUALENV_DIR)/bin/activate ; black $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
+ fi \
done
. $(VIRTUALENV_DIR)/bin/activate; black --check --config pyproject.toml contrib/ || exit 1;
. $(VIRTUALENV_DIR)/bin/activate; black --check --config pyproject.toml scripts/*.py || exit 1;
@@ -411,7 +415,9 @@ black: requirements .black-format
echo "Running black on" $$component; \
echo "==========================================================="; \
. $(VIRTUALENV_DIR)/bin/activate ; black --config pyproject.toml $$component/ || exit 1; \
+ if [ -d "$$component/bin" ]; then \
. $(VIRTUALENV_DIR)/bin/activate ; black --config pyproject.toml $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
+ fi \
done
# runner modules and packages
@for component in $(COMPONENTS_RUNNERS); do\
@@ -419,7 +425,9 @@ black: requirements .black-format
echo "Running black on" $$component; \
echo "==========================================================="; \
. $(VIRTUALENV_DIR)/bin/activate ; black --config pyproject.toml $$component/ || exit 1; \
+ if [ -d "$$component/bin" ]; then \
. $(VIRTUALENV_DIR)/bin/activate ; black --config pyproject.toml $$(grep -rl '^#!/.*python' $$component/bin) || exit 1; \
+ fi \
done
. $(VIRTUALENV_DIR)/bin/activate; black --config pyproject.toml contrib/ || exit 1;
. $(VIRTUALENV_DIR)/bin/activate; black --config pyproject.toml scripts/*.py || exit 1;
