Skip to content

Commit

Permalink
Test error set
Browse files Browse the repository at this point in the history
  • Loading branch information
Isengo1989 committed Dec 6, 2023
1 parent 533840a commit f1c13ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/watch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ file_contains(){
# Check if $WATCHER_CONTAINS contains the string "null" and is therefore empty or not set
if [[ $WATCHER_CONTAINS == "null" ]]; then
echo "No contain set"
ERROR_FOUND=1
printf -v "$ERROR_FOUND" '1'
fi
# Check if $WATCHER_CONTAINS contains the string $WATCHER_CONTAINS and if not call the Slack webhook
if [[ $FILE_CONTENT == *"$WATCHER_CONTAINS"* ]]; then
echo "String found!"
else
echo "String not found! Please check $WATCHER_URL"
ERROR_FOUND=1
printf -v "$ERROR_FOUND" '1'
#curl -X POST -H 'Content-type: application/json' --data '{"text":"String not found - not nice!"}' $SLACK_WEBHOOK
fi
}
Expand Down

0 comments on commit f1c13ff

Please sign in to comment.