diff --git a/goldenimage.pkr.hcl b/goldenimage.pkr.hcl index fad2588..c3121fc 100644 --- a/goldenimage.pkr.hcl +++ b/goldenimage.pkr.hcl @@ -76,7 +76,7 @@ locals { "curl --connect-timeout 2.37 -m 20 -o /tmp/parameters_find.sh https://raw.githubusercontent.com/xXkoshmarikXx/test-commit/master/parameters_find.sh && bash /tmp/parameters_find.sh --tags installation", ] : [], scripts = fileexists("goldenimage-test.sh") ? [ - "parameters_find.sh" + "goldenimage-test.sh" ] : [] } diff --git a/parameters_accepts.sh b/parameters_accepts.sh index d7d15fd..569dd45 100644 --- a/parameters_accepts.sh +++ b/parameters_accepts.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -set -euo pipefail # Constants LOCAL_IDENTIFY_OS_SCRIPT="identify_os.sh" REMOTE_IDENTIFY_OS_SCRIPT="https://raw.githubusercontent.com/inqwise/ansible-automation-toolkit/default/identify_os.sh" @@ -160,14 +159,5 @@ main() { echo "End goldenimage.sh" } - -# Trap errors and execute the catch_error function -trap 'catch_error "$ERROR"' ERR - # Execute the main function and capture errors -ERROR=$(main 2>&1) - -# If you want to ensure that the script exits after an error, you can use: -if [ $? -ne 0 ]; then - exit 1 -fi \ No newline at end of file +{ ERROR=$(main 2>&1 1>&$out); } {out}>&1 \ No newline at end of file