laravel / pint

Laravel Pint is an opinionated PHP code style fixer for minimalists.
https://laravel.com/docs/pint
MIT License
2.75k stars 139 forks source link

Pint with --repair option does not exit but shows success instead #288

Open Tamas-hi opened 1 month ago

Tamas-hi commented 1 month ago

Pint Version

1.17.0

PHP Version

8.2.2

Description

According to the docs :

If you would like Pint to fix any files with code style errors but also exit with a non-zero exit code if any errors were fixed, you may use the --repair option:

./vendor/bin/pint --repair

However after creating a project with Laravel Breeze, this is the behavior I experience:

  1. --test correctly signals a formatting error and exits

./vendor/bin/pint --test

FAIL .............................................................................................................................................. 46 files, 1 style issue
⨯ routes/auth.php

  1. --repair correctly signals the formatting error, fixes it, but does not exist and returns with success:

./vendor/bin/pint --repair

FIXED ....................................................................................................................................... 46 files, 1 style issue fixed
✓ routes/auth.php

I think I should see a big red X in the last row instead of the green tick.

Steps To Reproduce

  1. Initialize a brand new laravel project with Laravel Breeze
  2. Run Laravel Pint with the option --repair.
nunomaduro commented 1 month ago

@Tamas-hi can you try to understand why please? thanks!