Skip to content

Commit

Permalink
fix(core): override Path env variable on Windows platform (nrwl#22382)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelpelaez authored and arekkubaczkowski committed Mar 19, 2024
1 parent 7b430cc commit ec27452
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/nx/src/executors/run-commands/run-commands.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,9 @@ function processEnv(color: boolean, cwd: string, env: Record<string, string>) {
...localEnv,
...env,
};
res.PATH = localEnv.PATH; // need to override PATH to make sure we are using the local node_modules
// need to override PATH to make sure we are using the local node_modules
if (localEnv.PATH) res.PATH = localEnv.PATH; // UNIX-like
if (localEnv.Path) res.Path = localEnv.Path; // Windows

if (color) {
res.FORCE_COLOR = `${color}`;
Expand Down

0 comments on commit ec27452

Please sign in to comment.