adjust script output

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

View File

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

9
run.sh
View File

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