Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chiragparekh/6c8e346cf41e82c5f5031f0e468e04e8 to your computer and use it in GitHub Desktop.
Save chiragparekh/6c8e346cf41e82c5f5031f0e468e04e8 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment