MCPcopy
hub / github.com/coder/code-server / argsWithDefaults

Method argsWithDefaults

test/e2e/models/CodeServer.ts:226–243  ·  view source on GitHub ↗

* Combine arguments with defaults.

(args: string[])

Source from the content-addressed store, hash-verified

224 * Combine arguments with defaults.
225 */
226 private async argsWithDefaults(args: string[]): Promise<string[]> {
227 // This will be used both as the workspace and data directory to ensure
228 // instances don't bleed into each other.
229 const dir = await this.workspaceDir
230 return [
231 this.entry,
232 "--extensions-dir",
233 path.join(dir, "extensions"),
234 ...args,
235 // Setting the XDG variables would be easier and more thorough but the
236 // modules we import ignores those variables for non-Linux operating
237 // systems so use these flags instead.
238 "--config",
239 path.join(dir, "config.yaml"),
240 "--user-data-dir",
241 dir,
242 ]
243 }
244
245 /**
246 * Close the code-server process.

Callers 2

spawnMethod · 0.95
runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected