(args: {
containerName: string;
workspacePath: string;
initLogger: InitLogger;
abortSignal?: AbortSignal;
env?: Record<string, string>;
trusted?: boolean;
})
| 786 | } |
| 787 | |
| 788 | private async materializeCheckedOutWorkspace(args: { |
| 789 | containerName: string; |
| 790 | workspacePath: string; |
| 791 | initLogger: InitLogger; |
| 792 | abortSignal?: AbortSignal; |
| 793 | env?: Record<string, string>; |
| 794 | trusted?: boolean; |
| 795 | }): Promise<void> { |
| 796 | try { |
| 797 | // Container provisioning owns checkout completeness so initWorkspace can focus on |
| 798 | // running repo-controlled hooks against an already-materialized source tree. |
| 799 | await syncRuntimeGitSubmodules({ |
| 800 | runtime: this, |
| 801 | workspacePath: args.workspacePath, |
| 802 | initLogger: args.initLogger, |
| 803 | abortSignal: args.abortSignal, |
| 804 | env: args.env, |
| 805 | trusted: args.trusted, |
| 806 | }); |
| 807 | } catch (error) { |
| 808 | try { |
| 809 | await this.removeProvisioningContainer(args.containerName); |
| 810 | } catch (cleanupError) { |
| 811 | throw new Error( |
| 812 | `${getErrorMessage(error)} (cleanup failed: ${getErrorMessage(cleanupError)})` |
| 813 | ); |
| 814 | } |
| 815 | throw error; |
| 816 | } |
| 817 | } |
| 818 | |
| 819 | private async removeProvisioningContainer(containerName: string): Promise<void> { |
| 820 | const removeResult = await runDockerCommand(`docker rm -f ${containerName}`, 10000); |
no test coverage detected