From fc2bcf5e3ae56edd7ecf01610a89ecf451fdce03 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Mon, 11 Mar 2024 19:39:29 -0700 Subject: [PATCH] Fix shell script --- scripts/run-tests.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 8061033..17bf314 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -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