fix: Call aggregate_results in main shell after pipeline
The pipe into validate_examples_parallel creates a subshell, so TOTAL_VALIDATED and TOTAL_FAILED set inside it are lost. Now we call aggregate_results again in the main shell after the pipeline completes to properly count the results from the JSON files.
This commit is contained in:
parent
a2927a3f6b
commit
05e27afcb4
1 changed files with 4 additions and 1 deletions
|
|
@ -689,8 +689,11 @@ main() {
|
|||
TOTAL_EXAMPLES=$(echo "$examples" | wc -l)
|
||||
log "Found $TOTAL_EXAMPLES example files"
|
||||
|
||||
# Validate examples
|
||||
# Validate examples (runs in subshell due to pipe)
|
||||
echo "$examples" | validate_examples_parallel
|
||||
|
||||
# Re-aggregate in main shell (subshell variables don't propagate)
|
||||
aggregate_results
|
||||
fi
|
||||
|
||||
# Generate reports
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue