From 71a1c911e0761a80b669a110193cfe41b78cd980 Mon Sep 17 00:00:00 2001 From: Jarell <91372088+jarelllama@users.noreply.github.com> Date: Tue, 2 Apr 2024 12:24:25 +0800 Subject: [PATCH] Update --- functions/test_functions.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/functions/test_functions.sh b/functions/test_functions.sh index d984e5523..ecc2a1c9c 100644 --- a/functions/test_functions.sh +++ b/functions/test_functions.sh @@ -582,6 +582,14 @@ test_unparked_check() { printf "unparked,google.com,parked_domains\n" >> out_log.txt } +# Function 'on_exit' exits the script with exit status 1 if an error was found. +on_exit() { + if [[ "$error" == true ]]; then + printf "\n" + exit 1 + fi +} + # Function 'run_script' executes the script passed by the caller. # Input: # $1: scrip to execute @@ -631,14 +639,6 @@ check_and_exit() { on_exit } -# Function 'on_exit' exits the script with exit status 1 if an error was found. -on_exit() { - if [[ "$error" == true ]]; then - printf "\n" - exit 1 - fi -} - # Function 'check_terms' checks that a file contains all the given terms. # Input: # $1: file to check