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

Executable not readable or lacks permissions for Laravel Pint. #64

Open
QuentinLuc opened this issue Aug 28, 2024 · 10 comments
Open

Executable not readable or lacks permissions for Laravel Pint. #64

QuentinLuc opened this issue Aug 28, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@QuentinLuc
Copy link

Describe the bug

Hi! The extension works really great on Laravel projects. However, it's also enabled for other NodeJS projects and so I'm getting this error in the Output window of VSCode:
["ERROR" - 11:52:58] Executable not readable or lacks permissions for Laravel Pint.

Expected behavior

Shouldn't throw this error for non PHP Laravel files

Screenshots

Screenshot 2024-08-28 at 11 54 47

Environment:

  • Operating system: MacOS
  • IDE / version: : 1.92.2 (Universal) - Extension version 1.2.1
@QuentinLuc QuentinLuc added the bug Something isn't working label Aug 28, 2024
@taha-moghaddam
Copy link

composer require laravel/pint --dev fixed my problem

@d8vjork
Copy link
Member

d8vjork commented Sep 3, 2024

This might be an early discovery of the pint command not finding it, but you're right shouldn't run on any other file

Did you enable this only of PHP files on your VS Code config?

"[php]": {
        "editor.defaultFormatter": "open-southeners.laravel-pint",
        "editor.formatOnSave": true,
    },

@jakezneal
Copy link

Continuing on the conversation as I'm having the exact same issue as @QuentinLuc.

@d8vjork I have the above config already in my settings file, and in a different, non-Laravel project I'm getting the below error:

Screenshot 2024-10-22 at 16 34 25

@d8vjork
Copy link
Member

d8vjork commented Oct 22, 2024

@jakezneal Are you using Windows?

@jakezneal
Copy link

@d8vjork I'm using macOS (14.4.1) and VS Code (1.94.2)

@zhimma
Copy link

zhimma commented Oct 26, 2024

我也有同样的情况

@devNoiseConsulting
Copy link

I have Laravel Herd installed and this error was showing up. I think there are issues with the path to the PHP executable. I ended up create a symbolic link so I could give vscode a path that didn't have a space in it.

@asad-ali-git
Copy link

asad-ali-git commented Nov 28, 2024

I was facing the same issue.
I first removed the pint then installed it again and it fixed for me.

OS: Ubuntu 22.04.2 LTS

@madeadi
Copy link

madeadi commented Dec 26, 2024

I have Laravel Herd installed and this error was showing up. I think there are issues with the path to the PHP executable. I ended up create a symbolic link so I could give vscode a path that didn't have a space in it.

@devNoiseConsulting how did you do this? I'm facing the same issue in mac and using Herd.

["INFO" - 2:09:39 AM] Extension Name: open-southeners.laravel-pint.
["INFO" - 2:09:39 AM] Extension Version: 1.2.1.
["ERROR" - 2:09:39 AM] Executable not readable or lacks permissions for Laravel Pint.
["ERROR" - 2:09:57 AM] Executable not readable or lacks permissions for Laravel Pint.

@madeadi
Copy link

madeadi commented Dec 26, 2024

I found the issue on my side.

It's because in VS code, I opened the project from a folder with a space, e.g. ~/Library/Application Support/Herd/.../laravel, this will throw an error.

When I opened the project from a folder without space, e.g. ~/projects/laravel, this will not throw an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants