MCPcopy
hub / github.com/KeygraphHQ/shannon / workspaces

Function workspaces

apps/cli/src/commands/workspaces.ts:10–35  ·  view source on GitHub ↗
(version: string)

Source from the content-addressed store, hash-verified

8import { getWorkspacesDir } from '../home.js';
9
10export function workspaces(version: string): void {
11 const workspacesDir = getWorkspacesDir();
12 const image = getWorkerImage(version);
13
14 try {
15 execFileSync(
16 'docker',
17 [
18 'run',
19 '--rm',
20 '-v',
21 `${workspacesDir}:/app/workspaces`,
22 '-e',
23 'WORKSPACES_DIR=/app/workspaces',
24 image,
25 'node',
26 'apps/worker/dist/temporal/workspaces.js',
27 ],
28 { stdio: 'inherit', ...(os.platform() === 'win32' && { env: { ...process.env, MSYS_NO_PATHCONV: '1' } }) },
29 );
30 } catch {
31 console.error('ERROR: Failed to list workspaces. Is the Docker image available?');
32 console.error(` Run: docker pull ${image}`);
33 process.exit(1);
34 }
35}

Callers 1

index.tsFile · 0.85

Calls 3

getWorkspacesDirFunction · 0.85
getWorkerImageFunction · 0.85
errorMethod · 0.65

Tested by

no test coverage detected