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

Misleading error message when subprocess working directory does not exist #6655

Open
lheckemann opened this issue Nov 8, 2018 · 0 comments
Assignees
Labels

Comments

@lheckemann
Copy link
Contributor

Do you want to request a feature or report a bug?
Bug

What is the current behavior?

When a process is spawned and a nonexistent working directory is requested, the error code is ENOENT like when the executable doesn't exist. This results in the error message being "Couldn't find the binary ${program}", which can be very confusing when debugging (I wasted many an hour on this! :p )

yarn/src/util/child.js

Lines 82 to 86 in 09ceb0e

if (err.code === 'ENOENT') {
reject(new ProcessSpawnError(`Couldn't find the binary ${program}`, err.code, program));
} else {
reject(err);
}

If the current behavior is a bug, please provide the steps to reproduce.

TODO: I can't remember how I reached this condition, will get around to this…

What is the expected behavior?

I'm not sure exactly how this should behave instead, since I'm not sure the conditions can be distinguished properly.

Please mention your node.js, yarn and operating system version.
Node 8.12
yarn 1.12.1
NixOS 18.09

@ghost ghost assigned arcanis Nov 8, 2018
@ghost ghost added the triaged label Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants