From 924076ccf375a8b7809b8b37b05074d3342d5c6c Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 15 Oct 2026 12:22:58 +0500 Subject: don't fail if lib/ doesn't exist --- src/main.sh | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/main.sh b/src/main.sh index cb0e334..efd154b 100755 --- a/src/main.sh +++ b/src/main.sh @@ -24,18 +24,20 @@ _test_run_file() { for test_file; do source "$_script_dir/test.sh" - local lib_file - find "$tests_dir/lib" \ - -mindepth 1 \ - -maxdepth 1 \ - -type f \ - -name '*.sh' \ - -print0 \ - | sort -z \ - | \ - while IFS= read -d '' -r lib_file; do - source "$lib_file" - done + if [ -d "$tests_dir/lib" ]; then + local lib_file + find "$tests_dir/lib" \ + -mindepth 1 \ + -maxdepth 1 \ + -type f \ + -name '*.sh' \ + -print0 \ + | sort -z \ + | \ + while IFS= read -d '' -r lib_file; do + source "$lib_file" + done + fi source "$tests_dir/$test_file" -- cgit v1.3