Skip to content

Commit

Permalink
fix: Yarn workspace incorrectly resolves node_modules path during scr…
Browse files Browse the repository at this point in the history
…ipt execution (fixes #4564)
  • Loading branch information
nonara committed Jul 6, 2024
1 parent 7cafa51 commit a5ddb85
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/util/execute-lifecycle-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a5ddb85

Please sign in to comment.