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

Function uriToWSLFsPath

src/spec-node/utils.ts:60–73  ·  view source on GitHub ↗
(uri: URI, cliHost: CLIHost)

Source from the content-addressed store, hash-verified

58}
59
60export async function uriToWSLFsPath(uri: URI, cliHost: CLIHost): Promise<string> {
61 if (uri.scheme === 'file' && cliHost.type === 'wsl') {
62 // convert local path (e.g. repository-container Dockerfile) to WSL path
63 const { stdout } = await runCommandNoPty({
64 exec: cliHost.exec,
65 cmd: 'wslpath',
66 args: ['-u', uri.fsPath],
67 output: nullLog,
68 });
69 const cliHostPath = stdout.toString().trim();
70 return cliHostPath;
71 }
72 return uriToFsPath(uri, cliHost.platform);
73}
74
75export async function logUMask(params: DockerResolverParameters): Promise<string | undefined> {
76 // process.umask() is deprecated: https://nodejs.org/api/process.html#processumask

Callers 2

buildAndExtendImageFunction · 0.90
getImageBuildInfoFunction · 0.90

Calls 2

runCommandNoPtyFunction · 0.90
uriToFsPathFunction · 0.90

Tested by

no test coverage detected