vscode-laravel-pint
vscode-laravel-pint copied to clipboard
LaravelPint does not work with the Windows version of laravelHerd
Describe the bug When command is executed from terminal, it is formatted properly. But when the file is saved, it is not formatted.
Good one, no idea how can I help with this as a Mac user, probably need to check where PHP is being installed and if any PHP / artisan command is available to run on default Windows terminal
Can confirm this also applies to Mac version.
Switching VSCode to use ZSH and adding global composer vendor/bin to path solved it for me.
I'm on windows, when i execute ./vendor/bin/pint works well, but not with extension, works well on WSL with laravel sail, but not on windows with laravel Herd
I'm on windows, when i execute ./vendor/bin/pint works well, but not with extension, works well on WSL with laravel sail, but not on windows with laravel Herd
Probably the same problem
installed
It has been confirmed that php command can be executed in the container.
@d8vjork I am having the same issue.
Do you have any steps for running the extension running from source code and adding some logs to see whats actually happening?
@d8vjork I am having the same issue.
Do you have any steps for running the extension running from source code and adding some logs to see whats actually happening?
Just use the tasks from the debug side panel of VSCode when open this project while the yarn watch
running
@d8vjork I checked, and setting shell:true
will fix this issue on Windows with Laravel Herd.
Can you tell me how to build the extension so I can test it as an extension?
const exec = spawn(this.cmd, this.args, {
cwd: cwd || this.cwd,
shell: true
});
Found it. Please try this and let me know if it fixes your issue. (I only tested local pint, not global.)
@d8vjork For the global pint,, the command is wrong..
current command is : php pint --preset laravel d:\\Projects\\devil-www\\laravel-turso\\app\\Http\\Middleware\\Authenticate.php
it should not have php
in starting. because you get the Could not open input file: pint
error.
I try fix and formating working when i save file with autoformat but not work when i click right and select format.... its possible?
I try fix and formating working when i save file with autoformat but not work when i click right and select format.... its possible?
Thanks fort the reply.. I will check it.
@d8vjork For the global pint,, the command is wrong..
current command is :
php pint --preset laravel d:\\Projects\\devil-www\\laravel-turso\\app\\Http\\Middleware\\Authenticate.php
it should not have
php
in starting. because you get theCould not open input file: pint
error.
I believe this was like that due to some other shells and/or OS having a problem running just the file without the language interpreter binary prepended (I don't think the shebang is supported by all operating systems)
I believe this was like that due to some other shells and/or OS having a problem running just the file without the language interpreter binary prepended (I don't think the shebang is supported by all operating systems)
Other shells in windows?
@vikas5914 @d8vjork Is there any progress, can we get a fix asap? I'm getting the following message when file is saved, but no change in the file:
["INFO" - 12:47:45 PM] Extension Name: open-southeners.laravel-pint.
["INFO" - 12:47:45 PM] Extension Version: 1.2.0.
["INFO" - 12:57:42 PM] Formatting completed in 409ms.
@checkuzd can you try this version: https://github.com/open-southeners/vscode-laravel-pint/files/15135605/laravel-pint-1.2.1-test.zip