Skip to content

Instantly share code, notes, and snippets.

@WalrusSoup
Last active September 23, 2024 10:10
Show Gist options
  • Save WalrusSoup/797c2d777e94b6599c853d2178d413d2 to your computer and use it in GitHub Desktop.
Save WalrusSoup/797c2d777e94b6599c853d2178d413d2 to your computer and use it in GitHub Desktop.
Run laravel pint from Phpstorm with WSL on save

Saving this so I dont forget later.

Run Laravel Pint from Phpstorm with WSL on save with Laravel Sail

  1. create custom file watcher
  2. For tool to Run on Changes add the full path to vendor/bin/sail via WSL like so \\wsl$\Ubuntu\home\ozen\projects-sail\MYPROJECT\vendor\bin\sail
  3. Arguments bin pint $/FileRelativePath$
  4. Output paths to refresh $FilePath$
  5. Working Directory $ProjectFileDir$
  6. Environment Variables COMPOSE_INTERACTIVE_NO_CLI=1
  7. Auto-save edited files to trigger the watcher unchecked
  8. Trigger the watcher on external changes checked
  9. Show console: on error. Set to never after testing.
@chris-bkjg
Copy link

Thank you!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment