Switch from bash to sh for black wrapper.

This commit is contained in:
Dan Helfman 2018-10-15 09:25:57 -07:00
parent 1ab44d4201
commit e323290e61
2 changed files with 6 additions and 12 deletions

View file

@ -1,13 +1,7 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
set -e
python_version=$(python --version)
if [[ "$python_version" =~ "Python 3.5." ]]; then
echo "Skipping black due to lack of support for $python_version."
elif [[ "$python_version" =~ "Python 3.4." ]]; then
echo "Skipping black due to lack of support for $python_version."
else
if which black; then
black --skip-string-normalization --line-length 100 --check .
else
echo "Skipping black due to not being installed."
fi

View file

@ -5,11 +5,11 @@ skipsdist = True
[testenv]
usedevelop = True
deps = -rtest_requirements.txt
whitelist_externals = bash
whitelist_externals = sh
commands =
py.test --cov-report term-missing:skip-covered --cov=borgmatic --ignore=tests/end-to-end \
tests []
bash scripts/black
sh scripts/black
flake8 .
[testenv:black]