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

Accept to run docker exec, .bat file, or pint binary itself #69

Open
walter-developer opened this issue Nov 19, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@walter-developer
Copy link

Describe the bug
Does not execute pint inside a docker php container with pint installed manually with php composer

To reproduce
Steps to reproduce the behavior:
1 - Create a docker php container
2 - With vscode installed on windows, install the laravel pint extension
3 - Configure the vscode settings with:

{ "laravel-pint.configPath": "D:\\Github\\Repository\\ProjetName\\pint.json", "laravel-pint.executablePath" : "D:\\Github\\Repository\\ProjetName\\server\\php\\php.bat'", //"laravel-pint.executablePath": "docker exec --user root php-arkama php '/app/ProjetName/vendor/bin/pint'" }

Expected behavior
Run the command as if it were run manually in the windows terminal

Screenshots
no applicable.

Environment:

  • Operating System: Windows 11
  • IDE/Version: VSCode 1.68
  • Extension Version: Extension Version: 1.2.1
  • Extension Configuration:

{ "laravel-pint.configPath": "D:\\Github\\Repository\\ProjetName\\pint.json", "laravel-pint.executablePath" : "D:\\Github\\Repository\\ProjetName\\server\\php\\php.bat'", //"laravel-pint.executablePath": "docker exec --user root php-arkama php '/app/ProjetName/vendor/bin/pint'" }
Additional Context

error that occurs and does not generate more log details

["ERROR" - 02:52:31] Executable not readable or lacks permissions for Laravel Pint.

@walter-developer walter-developer added the bug Something isn't working label Nov 19, 2024
@bartbrinkman
Copy link

I have a similar use case:

"laravel-pint.executablePath": "docker-compose run --rm pint",
  pint:
    build:
      context: ./.docker
      dockerfile: php.dockerfile
    volumes:
      - .:/var/www/html:delegated
    entrypoint: [ "php", "/var/www/html/vendor/bin/pint" ]

docker-compose run --rm pint itself runs fine and accepts arguments:

$ docker-compose run --rm pint -V
Pint 1.18.1

@d8vjork
Copy link
Member

d8vjork commented Feb 8, 2025

Problem with this is that Windows needs the php command prepended so it wouldn't handle this bat file execution

@d8vjork
Copy link
Member

d8vjork commented Feb 8, 2025

Although alternative solution will be to rely first on the value of a new config from the extension itself to replace this binary prepended

Note to myself

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

3 participants