mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 04:22:01 +00:00
[build-utils] log more around package manager detection (#11594)
Add more loggign around package manager detection to see why we're not properly detecting `pnpm` given a pnpm lockfile.
This commit is contained in:
5
.changeset/calm-peaches-occur.md
Normal file
5
.changeset/calm-peaches-occur.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@vercel/build-utils": patch
|
||||
---
|
||||
|
||||
[build-utils] log more around package manager detection
|
||||
@@ -553,8 +553,9 @@ export function getEnvForPackageManager({
|
||||
env,
|
||||
});
|
||||
|
||||
const corepackEnabled = env.ENABLE_EXPERIMENTAL_COREPACK === '1';
|
||||
debug(
|
||||
`Detected ${detectedPackageManager} with lockfileVersion ${lockfileVersion} (${typeof lockfileVersion}): ${newPath}`
|
||||
`Detected ${detectedPackageManager} given lockfileVersion "${lockfileVersion}", package manager cli "${cliType}", and corepack enabled? ${corepackEnabled}: ${newPath}`
|
||||
);
|
||||
|
||||
const newEnv: { [x: string]: string | undefined } = {
|
||||
@@ -772,14 +773,6 @@ export function getPathForPackageManager({
|
||||
env,
|
||||
});
|
||||
|
||||
debug(
|
||||
`Detected ${
|
||||
overrides.detectedPackageManager
|
||||
} with lockfileVersion ${lockfileVersion} (${typeof lockfileVersion}): ${
|
||||
overrides.path
|
||||
}`
|
||||
);
|
||||
|
||||
const alreadyInPath = (newPath: string) => {
|
||||
const oldPath = env.PATH ?? '';
|
||||
return oldPath.split(path.delimiter).includes(newPath);
|
||||
|
||||
Reference in New Issue
Block a user