MCPcopy Index your code
hub / github.com/coder/mux / runSubmoduleCommand

Function runSubmoduleCommand

src/node/runtime/submoduleSync.ts:54–73  ·  view source on GitHub ↗
(args: {
  runtime: Runtime;
  workspacePath: string;
  abortSignal?: AbortSignal;
  env: Record<string, string>;
  command: string;
  timeout: number;
  fallbackError: string;
})

Source from the content-addressed store, hash-verified

52}
53
54async function runSubmoduleCommand(args: {
55 runtime: Runtime;
56 workspacePath: string;
57 abortSignal?: AbortSignal;
58 env: Record<string, string>;
59 command: string;
60 timeout: number;
61 fallbackError: string;
62}): Promise<void> {
63 const result = await execBuffered(args.runtime, args.command, {
64 cwd: args.workspacePath,
65 timeout: args.timeout,
66 abortSignal: args.abortSignal,
67 env: args.env,
68 });
69
70 if (result.exitCode !== 0) {
71 throw new Error(result.stderr || result.stdout || args.fallbackError);
72 }
73}
74
75async function runSubmoduleMaterialization(args: RuntimeSubmoduleSyncArgs): Promise<void> {
76 const env = buildGitExecutionEnv({ env: args.env, trusted: args.trusted });

Callers 1

Calls 1

execBufferedFunction · 0.90

Tested by

no test coverage detected