netty5/.github/scripts/check_leak.sh
Norman Maurer 342f52e813
Let script fail if one command fail (#10945)
Motivation:

We should use `set -e` to ensure we fail the script if one command fails.

Modifications:

Add set -e to script

Result:

Fail fast
2021-01-15 16:47:49 +01:00

17 lines
240 B
Bash
Executable File

#!/bin/bash
set -e
if [ "$#" -ne 1 ]; then
echo "Expected build log as argument"
exit 1
fi
if grep -q 'LEAK:' $1 ; then
echo "Leak detected, please inspect build log"
exit 1
else
echo "No Leak detected"
exit 0
fi