Skip to content

Commit

Permalink
fix(dev): dev server creates cross-platform PATH envvar
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori committed May 5, 2023
1 parent f5ef1ac commit d247cbb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/big-carrots-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@remix-run/dev": patch
---

normalize path for dev server PATH envvar
so that it works cross-platform (e.g. windows)
2 changes: 1 addition & 1 deletion packages/remix-dev/devServer_unstable/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let detectBin = async (): Promise<string> => {
if (pkgManager === "npm") {
// npm v9 removed the `bin` command, so have to use `prefix`
let { stdout } = await execa(pkgManager, ["prefix"]);
return stdout.trim() + "/node_modules/.bin";
return path.join(stdout.trim(), "node_modules", ".bin");
}
let { stdout } = await execa(pkgManager, ["bin"]);
return stdout.trim();
Expand Down

0 comments on commit d247cbb

Please sign in to comment.