Skip to content

Commit

Permalink
add workaround for missing 'find -printf' on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
terhorstd committed Jan 22, 2025
1 parent a69ce17 commit f7e9464
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion testsuite/do_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@ list_files() {
# instead use list_files like
#
# list_files <somedir> <some_pattern> | while read -r test_name; do ... done
find "${1}" -maxdepth 1 -name "${2}" -printf '%f\n'
if test "${INFO_OS}" = "Darwin"; then
# ref https://stackoverflow.com/a/752893
find "${1}" -maxdepth 1 -name "${2}" -print0 | xargs -0 -n1 basename
else
find "${1}" -maxdepth 1 -name "${2}" -printf '%f\n'
fi
}

echo "================================================================================"
Expand Down

0 comments on commit f7e9464

Please sign in to comment.