Wrapper around Dir.createDirPathStatus that handles verbose and error output.
pub fn installDir(
maker: *Maker,
arena: Allocator,
dest_path: Path,
asking_step_index: Configuration.Step.Index,
) Step.ExtendedMakeError!Dir.CreatePathStatus
pub fn installDir(
maker: *Maker,
arena: Allocator,
dest_path: Path,
asking_step_index: Configuration.Step.Index,
) Step.ExtendedMakeError!Dir.CreatePathStatus {
const graph = maker.graph;
const io = graph.io;
if (graph.verbose) try graph.handleVerbose(null, null, &.{
"install", "-d", try dest_path.toString(arena),
});
return dest_path.root_dir.handle.createDirPathStatus(io, dest_path.sub_path, .default_dir) catch |err| {
const s = stepByIndex(maker, asking_step_index);
return s.fail(maker, "failed creating dir {f}: {t}", .{ dest_path, err });
};
}