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

Function pathExists

src/test/testUtils.ts:121–128  ·  view source on GitHub ↗
(cli: string, workspaceFolder: string, location: string)

Source from the content-addressed store, hash-verified

119 }
120}
121export async function pathExists(cli: string, workspaceFolder: string, location: string) {
122 try {
123 await shellExec(`${cli} exec --workspace-folder ${workspaceFolder} test -e ${location}`);
124 return true;
125 } catch (err) {
126 return false;
127 }
128}
129export async function commandMarkerTests(cli: string, workspaceFolder: string, expected: { postCreate: boolean; postStart: boolean; postAttach: boolean }, message: string) {
130 const actual = {
131 postCreate: await pathExists(cli, workspaceFolder, '/tmp/postCreateCommand.testmarker'),

Callers 3

describeTests2Function · 0.90
dotfiles.test.tsFile · 0.90
commandMarkerTestsFunction · 0.85

Calls 1

shellExecFunction · 0.85

Tested by

no test coverage detected