diff --git a/src/util/execute-lifecycle-script.js b/src/util/execute-lifecycle-script.js index f5db0821b4..6d0bb33f61 100644 --- a/src/util/execute-lifecycle-script.js +++ b/src/util/execute-lifecycle-script.js @@ -195,7 +195,12 @@ export async function makeEnv( pathParts.unshift(path.join(config.workspaceRootFolder, binFolder)); } pathParts.unshift(path.join(config.linkFolder, binFolder)); - pathParts.unshift(path.join(cwd, binFolder)); + + let realBinFolder = path.join(cwd, binFolder); + if (await fs.exists(realBinFolder)) { + realBinFolder = await fs.realpath(realBinFolder); + } + pathParts.unshift(realBinFolder); } let pnpFile;