MCPcopy Create free account
hub / github.com/microsoft/vscode-cpptools / pathsFromVariable

Function pathsFromVariable

Extension/src/Utility/Filesystem/filepath.ts:19–21  ·  view source on GitHub ↗
(environmentVariable: string = 'PATH')

Source from the content-addressed store, hash-verified

17export const normalize = isWindows ? (p: string) => norm(p).toLowerCase().replace(/^([a-z]\:)/, ($1) => $1.toUpperCase()) : norm;
18
19export function pathsFromVariable(environmentVariable: string = 'PATH'): string[] {
20 return process.env[environmentVariable]?.split(delimiter) || [];
21}
22
23export async function filterToFolders(paths: string[]): Promise<string[]> {
24 const set = new Set(paths);

Callers 1

program.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected