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

Catch spawn ENOENT and give a more user-friendly error instead #198

Closed
dmnd opened this issue Sep 2, 2014 · 2 comments
Closed

Catch spawn ENOENT and give a more user-friendly error instead #198

dmnd opened this issue Sep 2, 2014 · 2 comments

Comments

@dmnd
Copy link

dmnd commented Sep 2, 2014

This error is really common because linters aren't always on a user's system path. Furthermore Atom doesn't even pick up the system path until #150 is fixed.

Right now when someone sees this error, it's not obvious that it comes from linter. Once they work that out, they have to realize that it means something is wrong with their path. The next step is to configure the path for a linter etc.

We should catch the spawn ENOENT message and instead display something like this:

Package linter-foo tried to run foo but the executable was not found. You can fix this in one of the following ways:

  1. If foo is not on your path, configure the full executable path in linter-foo settings.
  2. If foo is on your path, please ensure you start Atom from the command line (See $PATH only present when Atom is launched from command line #150)
  3. (Specific linters only) If you're using RVM or virtualenv, please ensure linter-foo knows where the linter executable is

The atom process sees the following version of $PATH:

See also AtomLinter/linter-rubocop#11

@thumbpiano
Copy link

FYI to folks getting the ENOENT error.

Try installing GIT and allowing the software to add GIT to the Environment Variable Path. This solved the problem of the ENOENT error during the package installation of Linter for ATOM on Windows 7. This solution was described here: #114

GIT Downloads for LINUX, MAC and Windows:
http://git-scm.com/downloads

@dmnd
Copy link
Author

dmnd commented Sep 6, 2014

Thanks @thumbpiano! That looks like a different class of error, though: if I understand correctly, it prevents installation of linter on Windows. So it wouldn't make sense to have that solution in the message I describe above.

The error I'm referring to above happens not during installation but instead when a file is being linted. Let's keep discussion of the installation issue to #114.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants