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

Executables path does not work with a relative path #48

Open
daronspence opened this issue Mar 20, 2021 · 4 comments
Open

Executables path does not work with a relative path #48

daronspence opened this issue Mar 20, 2021 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@daronspence
Copy link

Describe the bug
Relative settings path to vendor phpcs does not work

To Reproduce
Steps to reproduce the behavior:

  1. clone project: https://github.com/Daronspence/wongjn-phpsniffer-bug
  2. composer install
  3. Assert sniffing fails with relative executablesPath setting

Expected behavior
For the executables path setting to work when the value is a relative path for the project.

Environment

  • OS: Mac 11.2.3 (intel)
  • VSCode version: Version: 1.54.3
  • PHP CLI version: [e.g. 7.2/3/4]
  • squizlabs/PHP_CodeSniffer version: 3.4 (global and local)

Additional context
Using a full path for the executable folder setting works. Without a full path, it fails.

@daronspence daronspence added the bug Something isn't working label Mar 20, 2021
@wongjn
Copy link
Owner

wongjn commented Mar 20, 2021

Thank you for the bug report and the reproduction repository. I've just tried it and the extension works as expected. What errors are coming up (if any)?

@wongjn wongjn added the question Further information is requested label Mar 20, 2021
@daronspence
Copy link
Author

@wongjn its the “can’t find path to executables” error toast in the bottom right hand corner.

Not sure what to say other than that. Maybe it’s a macOS thing?

@wongjn
Copy link
Owner

wongjn commented Mar 21, 2021

Can't say for sure. Unfortunately, I do not have a Mac to test on.

Is the error message exactly "Specified `phpcs` executable not found, please check your `executableFolder` setting."?
Does running ./stuff/vendor/bin/phpcs work fine?

@daronspence
Copy link
Author

https://cln.sh/1jdhuz

https://cln.sh/oqBd2o

Running it manually works fine. I wonder if it has to do with how VScode processes those relative paths on the OS. If I have time, I can try to debug it myself. Not super familiar with extension development but I can give it a shot.

@wongjn wongjn added help wanted Extra attention is needed and removed question Further information is requested labels Mar 27, 2021
@wongjn wongjn removed their assignment Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants