A fork of mtelver's day10 project

My fork() is best

+13 -12
+13 -12
bin/main.ml
··· 458 458 459 459 let run_health_check_multi (config : Config.t) package_arg = 460 460 let packages = expand_package_arg package_arg in 461 + (* Ensure output directories exist for multi-package builds *) 462 + let () = Option.iter (fun path -> Os.mkdir ~parents:true path) config.json in 463 + let () = Option.iter (fun path -> Os.mkdir ~parents:true path) config.md in 464 + let () = Option.iter (fun path -> Os.mkdir ~parents:true path) config.dot in 465 + let run_with_package pkg_name = 466 + let json = Option.map (fun path -> Path.(path / pkg_name ^ ".json")) config.json in 467 + let md = Option.map (fun path -> Path.(path / pkg_name ^ ".md")) config.md in 468 + let dot = Option.map (fun path -> Path.(path / pkg_name ^ ".dot")) config.dot in 469 + let config = { config with package = pkg_name; json; md; dot } in 470 + run_health_check config 471 + in 461 472 match config.fork with 462 - | Some n -> 463 - Os.fork ~np:n 464 - (fun pkg_name -> 465 - let config = { config with package = pkg_name } in 466 - run_health_check config) 467 - packages 468 - | None -> 469 - List.iter 470 - (fun pkg_name -> 471 - let config = { config with package = pkg_name } in 472 - run_health_check config) 473 - packages 473 + | Some n -> Os.fork ~np:n run_with_package packages 474 + | None -> List.iter run_with_package packages 474 475 475 476 let cache_dir_term = 476 477 let doc = "Directory to use for caching (required)" in