From 39fdaaf43c633492a9263c9e89a2a7fad02453d0 Mon Sep 17 00:00:00 2001 From: TuDo1403 Date: Thu, 12 Sep 2024 13:43:21 +0700 Subject: [PATCH] fix: return error code if script ran failed --- run.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/run.sh b/run.sh index 8c161e8..6601603 100755 --- a/run.sh +++ b/run.sh @@ -197,6 +197,10 @@ start_time=$(date +%s) ${op_command} forge script --offline ${verify_arg} ${@} -g 200 --sig 'run(bytes,string)' $(cast calldata 'run()') "${extra_argument}" +if [ $? -ne 0 ]; then + exit 1 +fi + end_time=$(date +%s) echo "Execution time: $((end_time - start_time))s"