adjust script output

This commit is contained in:
Joseph Montanaro 2022-01-21 10:52:23 -08:00
parent 935eb6cc51
commit 48027afd0e
2 changed files with 5 additions and 6 deletions

View File

@ -13,5 +13,4 @@ steps:
SLACK_HOOK_URL:
from_secret: slack_hook_url
commands:
- chmod +x run.sh
- ./run.sh
- bash run.sh

6
run.sh
View File

@ -1,8 +1,8 @@
set +x
# capture output so we can display conditionally
INSTALL_OUTPUT=$(pip install requests)
# also simulate -x manually just for the heck of it
INSTALL_OUTPUT=$(pip install requests 2>&1)
if [[ $? > 0 ]]; then
echo "+ pip install requests"
echo "$INSTALL_OUTPUT"
exit 1
fi