MCPcopy Create free account
hub / github.com/vercel/vercel / alreadyInPath

Function alreadyInPath

packages/build-utils/src/fs/run-user-scripts.ts:1047–1050  ·  view source on GitHub ↗
(newPath: string)

Source from the content-addressed store, hash-verified

1045 };
1046
1047 const alreadyInPath = (newPath: string) => {
1048 const oldPath = env.PATH ?? '';
1049 return oldPath.split(path.delimiter).includes(newPath);
1050 };
1051
1052 if (newPath && !alreadyInPath(newPath)) {
1053 // Ensure that the binaries of the detected package manager are at the

Callers 2

getEnvForPackageManagerFunction · 0.85
getPathForPackageManagerFunction · 0.85

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected