Skip to content

Commit c58f731

Browse files
committed
Handle empty build results when calculating totals
- Default totals to 0 if build results are empty to prevent errors
1 parent 80b67fd commit c58f731

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/cachix-push.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ jobs:
7474
}
7575
})
7676
77-
# Calculate totals
78-
let total_paths_count = ($build_results_with_cache_info | get path_count | math sum)
79-
let total_cached_count = ($build_results_with_cache_info | get cached_count | math sum)
77+
# Calculate totals (default to 0 if empty)
78+
let total_paths_count = ($build_results_with_cache_info | get path_count | default 0 | math sum)
79+
let total_cached_count = ($build_results_with_cache_info | get cached_count | default 0 | math sum)
8080
8181
# Build summary
8282
let package_table = ($build_results_with_cache_info | each {|pkg|

0 commit comments

Comments
 (0)