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

Method quoteForRemote

src/node/runtime/DockerRuntime.ts:337–346  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

335 }
336
337 protected quoteForRemote(filePath: string): string {
338 // Expand ~ to container user's home (detected at runtime, defaults to /root)
339 const home = this.containerHome ?? "/root";
340 const expanded = filePath.startsWith("~/")
341 ? `${home}/${filePath.slice(2)}`
342 : filePath === "~"
343 ? home
344 : filePath;
345 return shescape.quote(expanded);
346 }
347
348 protected cdCommand(cwd: string): string {
349 return `cd ${shescape.quote(cwd)}`;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected