This is an automated email from the ASF dual-hosted git repository.

dblevins pushed a commit to branch jakartaee9-tck
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git

commit 12bb2d85897ad07c4147e338fae9e70677912999
Author: David Blevins <dblev...@tomitribe.com>
AuthorDate: Wed Oct 26 16:14:08 2022 -0700

    Ensure the --source option causes an exit if file not found
---
 runtests | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/runtests b/runtests
index 7e60be8..41e0946 100755
--- a/runtests
+++ b/runtests
@@ -202,7 +202,7 @@ processOptions() {
 
             --source)
                 assertOptionArg "$1" "$2"
-                src="$(readlink -f "$2")"
+                src="$2"
                 shift
                 ;;
 
@@ -323,9 +323,14 @@ echo ">>> config => $( echo "$CONFIG" | sed 's/ /\n/g')"
 echo "" # just an empty line
 
 [ ! -z "$src" ] && {
-    ls "$src"
+    [ -f "$src" ] || {
+       echo "Cannot source file $src: file not found"
+       exit 1
+    }
+
     source "$src"
 }
+
 [ ! -z $env ] && export
 
 # printing the content of the 2 main directories

Reply via email to