-
Notifications
You must be signed in to change notification settings - Fork 1
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
Failed to spawn command phpcs
.
#11
Comments
You should be able to put the full path to PHPCS in the settings (by default its just phpcs and relies on your path). Go to Edit -> Preferences and find AtomPHPCS and click the settings. |
It somehow does not help I just get the same error message with the path:
But when I run it from the cli it works fine. Maybe it can not access this? Is it possible that I have to do something so atom can access it? |
You got me. The only thing I can think of is maybe expand ~ to the full path? I know from experience some applications do not handle this. |
If I do this I get an atom error |
na I still use PEAR. |
Just tried the composer way, by expanding the ~, seems to have it working. The cannot open file could be a problem with a config callback I have on that page. I can't look now, but I will file an issue and address it later. Try building the complete path outside and pasting it in, seems to workaround it. |
Sadly it does not work for me either, are you on a mac as well? The expanded path would be Also all methods I tried with |
Nope, I'm on Linux. Yeah the error is fine, I think its because the setting registers a change and it tries to run phpcs on each editor open, so it should pop up cos it cannot open the file, but once its correct in the settings, the error should disappear. (To test it, once the setting is correct, go to an editor, make a cs violation and save (or ctrl-alt-s)). The path looks correct to me as well. Oh obviously assuming you did the composer global require command to install and not the package one. If none of that works, I got nothing :-( |
BTW the config setting issue is at #12 |
Hmm, no I still can not get it to work. :( |
Not sure what is going on. I cannot replicate it here. You could try the new version which fixes the config bug, but I'm not holding my breath. |
Hmm, no, sadly not, I still get the "incorrectly setup" option in the console. Can I provide any information? Could I have missed some setup step or something? |
This might explain the problem about the PATH atom-community/atom-script#61, But this doesn't address the issue of using the full path. In the CLI, did u try the full path and double check the full path. ie. if you try: /fullpath/to/phpcs --standard=STANDARD --report=csv /fullpath/to/file Also what standard are you using? Is it a correct standard (check by phpcs -i)? |
Okay, somehow it seems to now be working using the full path to both phpcs and phpcbf
And the standard to I am a little bit confused, because it had it like this (apart from PSR1) before and it did not work. Maybe I restarted my mac in between and that fixed it. Works anyhow, thanks for your support. 👍 |
w00t! |
Hey, I get the error:
However I did install phpcs via composer https://github.com/squizlabs/PHP_CodeSniffer and I have composer in my
PATH
export PATH="/usr/local/bin:/usr/local/sbin:~/.composer/vendor/bin:$PATH"
This should be fine, correct? I still get the error though. Maybe it would be good if you could add the installation of phpcs to the readme. Thanks.
The text was updated successfully, but these errors were encountered: