open-southeners / vscode-laravel-pint

🍺 Integrates Laravel Pint into your VSCode projects for automatic code formatting
https://marketplace.visualstudio.com/items?itemName=open-southeners.laravel-pint
MIT License
82 stars 17 forks source link

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

Open QuentinLuc opened 2 months ago

QuentinLuc commented 2 months ago

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:

taha-moghaddam commented 2 months ago

composer require laravel/pint --dev fixed my problem

d8vjork commented 2 months ago

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 commented 1 week ago

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 commented 1 week ago

@jakezneal Are you using Windows?

jakezneal commented 1 week ago

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

zhimma commented 1 week ago

ζˆ‘δΉŸζœ‰εŒζ ·ηš„ζƒ…ε†΅