MCPcopy Index your code
hub / github.com/devcontainers/cli / generateMountCommand

Function generateMountCommand

src/spec-node/dockerfileUtils.ts:280–294  ·  view source on GitHub ↗
(mount: Mount | string)

Source from the content-addressed store, hash-verified

278 * @returns mount command string
279 */
280export function generateMountCommand(mount: Mount | string): string[] {
281 const command: string = '--mount';
282
283 if (typeof mount === 'string') {
284 return [command, mount];
285 }
286
287 const type: string = `type=${mount.type},`;
288 const source: string = mount.source ? `src=${mount.source},` : '';
289 const destination: string = `dst=${mount.target}`;
290
291 const args: string = `${type}${source}${destination}`;
292
293 return [command, args];
294}

Callers 1

spawnDevContainerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected