Skip to content

resolveWorkspace

View as Markdown
function resolveWorkspace(requested, cfg): Promise<string>;

Defined in: core/src/workspace.ts:13

Canonicalises requested (default cfg.default) with realpath — so symlinks are followed — and requires the result to be an existing directory inside one of the realpath’d roots. Path checks are not a sandbox; they only keep sessions inside the configured roots.

Parameter Type
requested string | undefined
cfg { allowedRoots: string[]; default: string; }
cfg.allowedRoots string[]
cfg.default string

Promise<string>