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

Bun.spawn with a non-existant cwd prints error with wrong path #8024

Open
paperclover opened this issue Jan 7, 2024 · 2 comments
Open

Bun.spawn with a non-existant cwd prints error with wrong path #8024

paperclover opened this issue Jan 7, 2024 · 2 comments
Labels
bug Something isn't working bun:spawn good first issue Something that would be good for new contributors

Comments

@paperclover
Copy link
Member

What version of Bun is running?

No response

What platform is your computer?

No response

What steps can reproduce the bug?

adapted from my journal processing code:

    Bun.spawnSync({
      cmd: ['python3'],
      stdio: ["inherit", "inherit", "inherit"],
      cwd: `/something/that/doesnt/exist`
    });
image

What is the expected behavior?

print that the current working directory doesnt exist

What do you see instead?

it says the binary doesnt exist

Additional information

No response

@paperclover paperclover added the bug Something isn't working label Jan 7, 2024
@Electroid Electroid added bun.js Something to do with a Bun-specific API good first issue Something that would be good for new contributors labels Jan 8, 2024
@lukasmatta
Copy link

I'm afraid this one is not solvable, here is the same issue in NodeJS with explanation - nodejs/node#45279 (comment)

@paperclover
Copy link
Member Author

i wonder if it would be worth checking if the current working directory exists after an ENOENT to refine the error message. it would be an extra syscall in the error case though

@Electroid Electroid added bun:spawn and removed bun.js Something to do with a Bun-specific API labels Jun 12, 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 bun:spawn good first issue Something that would be good for new contributors
Projects
None yet
Development

No branches or pull requests

3 participants