From d0bffd5e157778fa882975e2be182c424257f424 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 5 Jun 2022 19:21:48 -0500 Subject: [PATCH] Bugfix: When any of -c, -p, or -s is the last parameter in test.sh no error is thrown. These must have an error because they expect an additional argument. Change the behavior of the code to cause an error in this cases. I took the lazy way out and just set the variables to trigger an error rather than implementing a specific error handler for these cases. --- build/scripts/test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/scripts/test.sh b/build/scripts/test.sh index 9b71799..3c6c847 100644 --- a/build/scripts/test.sh +++ b/build/scripts/test.sh @@ -102,8 +102,10 @@ test_main() { build_project=yes elif [[ $p == "-s" || $p == "--path_scripts" ]] ; then grab_next=path_scripts + path_scripts= elif [[ $p == "-t" || $p == "--path_test" ]] ; then grab_next=path_test + path_test= elif [[ $test_system == "" ]] ; then test_system="$p" else @@ -154,7 +156,7 @@ test_main() { test_system=normal fi - if [[ $build_compiler == "" ]] ; then + if [[ $grab_next != "build_compiler" && $build_compiler == "" ]] ; then build_compiler=gcc fi -- 1.8.3.1