diff --git a/buildtestpublish_all.sh b/buildtestpublish_all.sh index abec964..3dd9164 100755 --- a/buildtestpublish_all.sh +++ b/buildtestpublish_all.sh @@ -120,13 +120,17 @@ function buildtestpublish() { function buildtestpublish_all() { PREVIOUS_DIR=$(pwd) - # find all subdirectories in the current directory that don't begin with a dot - find "$SCRIPT_DIR" -maxdepth 1 -type d \ + # Create array of directories to avoid subshell issues with while loop + local dirs=() + while IFS= read -r -d '' dir; do + dirs+=("$dir") + done < <(find "$SCRIPT_DIR" -maxdepth 1 -type d \ -not -name ".*" \ -not -path "$SCRIPT_DIR" \ - -print0 | while IFS= read -r -d '' dir; \ - do + -print0) + # Process each directory + for dir in "${dirs[@]}"; do buildtestpublish "${dir}" || true # Continue even if one project fails done