MCPcopy
hub / github.com/coder/mux / waitForStartupScripts

Method waitForStartupScripts

src/node/services/coderService.ts:1253–1264  ·  view source on GitHub ↗

* Wait for Coder workspace startup scripts to complete. * Runs `coder ssh --wait=yes -- true` and streams output.

(
    workspaceName: string,
    abortSignal?: AbortSignal
  )

Source from the content-addressed store, hash-verified

1251 * Runs `coder ssh <workspace> --wait=yes -- true` and streams output.
1252 */
1253 async *waitForStartupScripts(
1254 workspaceName: string,
1255 abortSignal?: AbortSignal
1256 ): AsyncGenerator<string, void, unknown> {
1257 log.debug("Waiting for Coder startup scripts", { workspaceName });
1258 yield* streamCoderCommand(
1259 ["ssh", workspaceName, "--wait=yes", "--", "true"],
1260 "coder ssh --wait failed",
1261 abortSignal,
1262 "Coder startup script wait aborted"
1263 );
1264 }
1265
1266 /**
1267 * Create a new Coder workspace. Yields build log lines as they arrive.

Callers 4

runFunction · 0.80
doEnsureReadyMethod · 0.80
postCreateSetupMethod · 0.80

Calls 2

streamCoderCommandFunction · 0.85
debugMethod · 0.80

Tested by 1

runFunction · 0.64