My aggregated monorepo of OCaml code, automaintained
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use Sys.command sudo rm -rf for --rebuild-base

Sudo.rm_rf tries non-sudo first and may silently fail on
root-owned base image files. Use direct sudo rm -rf instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+4 -4
+4 -4
day11/bin/cmd_batch.ml
··· 250 250 let os_dir_pre = Fpath.(cache_dir / Printf.sprintf "%s-%s-%s" 251 251 os_distribution os_version arch) in 252 252 Printf.printf "Deleting base image and all build layers for rebuild...\n%!"; 253 - (* Both dirs have root-owned files from Docker export / container builds *) 254 - Common.with_eio (fun env -> 255 - ignore (Day11_exec.Sudo.rm_rf env base_dir); 256 - ignore (Day11_exec.Sudo.rm_rf env os_dir_pre)) 253 + (* Both dirs have root-owned files — go straight to sudo rm -rf *) 254 + ignore (Sys.command 255 + (Printf.sprintf "sudo rm -rf %s %s" 256 + (Fpath.to_string base_dir) (Fpath.to_string os_dir_pre))) 257 257 end; 258 258 (* Try to load cached base image for DAG construction. *) 259 259 let base_opt = Day11_build.Base.load_cached ~cache_dir