Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

child_process.spawn does not use specified PATH #16070

Open
Electroid opened this issue Dec 31, 2024 · 0 comments
Open

child_process.spawn does not use specified PATH #16070

Electroid opened this issue Dec 31, 2024 · 0 comments
Labels
bug Something isn't working node.js Compatibility with Node.js APIs

Comments

@Electroid
Copy link
Contributor

When you pass a custom PATH to spawn() it is not used, e.g.

import { join } from "path";
import { spawn } from "child_process";

spawn("tsc", ["--version"], {
  env: {
    PATH: join(process.cwd(), "node_modules", ".bin")
  }
});

// Works in Node
// Doesn't work in Bun
@Electroid Electroid added bug Something isn't working node.js Compatibility with Node.js APIs labels Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working node.js Compatibility with Node.js APIs
Projects
None yet
Development

No branches or pull requests

1 participant