@@ -56,50 +56,46 @@ export const task: Task<Args> = {
5656 const start_time = performance . now ( ) ;
5757
5858 // Run command in parallel across all repos
59- const results = await map_concurrent_settled (
60- repos ,
61- async ( repo ) => {
62- const repo_start = performance . now ( ) ;
63- const repo_name = repo . name ;
64- const repo_dir = repo . path ;
65-
66- try {
67- // Parse command into cmd + args for spawn
68- // For now, we use shell mode to support pipes/redirects/etc
69- const spawned = await spawn_out ( 'sh' , [ '-c' , command ] , {
70- cwd : repo_dir ,
71- } ) ;
72-
73- const duration_ms = performance . now ( ) - repo_start ;
74- const success = spawned . result . ok ;
75-
76- const result : RunResult = {
77- repo_name,
78- repo_dir,
79- status : success ? 'success' : 'failure' ,
80- exit_code : spawned . result . code ?? 0 ,
81- stdout : spawned . stdout || '' ,
82- stderr : spawned . stderr || '' ,
83- duration_ms,
84- } ;
85-
86- return result ;
87- } catch ( error ) {
88- const duration_ms = performance . now ( ) - repo_start ;
89- return {
90- repo_name,
91- repo_dir,
92- status : 'failure' as const ,
93- exit_code : - 1 ,
94- stdout : '' ,
95- stderr : '' ,
96- duration_ms,
97- error : String ( error ) ,
98- } ;
99- }
100- } ,
101- concurrency ,
102- ) ;
59+ const results = await map_concurrent_settled ( repos , concurrency , async ( repo ) => {
60+ const repo_start = performance . now ( ) ;
61+ const repo_name = repo . name ;
62+ const repo_dir = repo . path ;
63+
64+ try {
65+ // Parse command into cmd + args for spawn
66+ // For now, we use shell mode to support pipes/redirects/etc
67+ const spawned = await spawn_out ( 'sh' , [ '-c' , command ] , {
68+ cwd : repo_dir ,
69+ } ) ;
70+
71+ const duration_ms = performance . now ( ) - repo_start ;
72+ const success = spawned . result . ok ;
73+
74+ const result : RunResult = {
75+ repo_name,
76+ repo_dir,
77+ status : success ? 'success' : 'failure' ,
78+ exit_code : spawned . result . code ?? 0 ,
79+ stdout : spawned . stdout || '' ,
80+ stderr : spawned . stderr || '' ,
81+ duration_ms,
82+ } ;
83+
84+ return result ;
85+ } catch ( error ) {
86+ const duration_ms = performance . now ( ) - repo_start ;
87+ return {
88+ repo_name,
89+ repo_dir,
90+ status : 'failure' as const ,
91+ exit_code : - 1 ,
92+ stdout : '' ,
93+ stderr : '' ,
94+ duration_ms,
95+ error : String ( error ) ,
96+ } ;
97+ }
98+ } ) ;
10399
104100 const total_duration_ms = performance . now ( ) - start_time ;
105101
0 commit comments