in src/shipit/phase/ShipItCreateNewRepoPhase.php [149:175]
public static async function genCreateNewGitRepoAt(
ShipItManifest $manifest,
string $output_dir,
(function(ShipItChangeset): Awaitable<ShipItChangeset>) $gen_filter,
shape('name' => string, 'email' => string) $committer,
bool $do_submodules = true,
?string $revision = null,
): Awaitable<void> {
if (PHP\file_exists($output_dir)) {
throw new ShipItException("path '$output_dir' already exists");
}
PHP\mkdir($output_dir, 0755, /* recursive = */ true);
try {
await self::genCreateNewGitRepoImpl(
$output_dir,
$manifest,
$gen_filter,
$committer,
$do_submodules,
$revision,
);
} catch (\Exception $e) {
await (new ShipItShellCommand(null, 'rm', '-rf', $output_dir))->genRun();
throw $e;
}
}