Skip to content

Commit

Permalink
Fix shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
cgewecke committed Mar 12, 2024
1 parent 975ec6b commit fc2bcf5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ set -o errexit
trap cleanup EXIT

cleanup() {
# Github actions kills the process
if [ -n "$CI" ]; then
echo "Exiting without killing Hardhat Node in CI"
return
fi

if [ -n "$hardhat_node_pid" ] && ps -p $hardhat_node_pid > /dev/null; then
echo "Killing Hardhat Node."
kill -9 $hardhat_node_pid
Expand Down

0 comments on commit fc2bcf5

Please sign in to comment.