@@ -32,15 +32,17 @@ protected function doExecute(Config $config, IO $io, Repository $repository, Act
3232 $ finder ->in ($ directories )->files ()->name (preg_filter ('/^/ ' , '*. ' , $ extensions ));
3333
3434 if ($ finder ->hasResults ()) {
35- $ io ->write (sprintf ('Running %s on files: ' , $ prettierCommand ), true , IO :: VERBOSE );
35+ $ io ->write (sprintf ('Running %s on files: ' , $ prettierCommand ));
3636
3737 foreach ($ finder as $ file ) {
38- if ($ this ->shouldSkipFileCheck ($ file , $ excludedFiles )) {
38+ if ($ this ->shouldSkipFileCheck ($ file-> getPath () , $ excludedFiles )) {
3939 continue ;
4040 }
4141
4242 $ result = $ this ->checkPrettier ($ file ->getPath (), $ prettierCommand , $ formatOptions );
43- $ io ->write ($ result ['output ' ]);
43+
44+ $ io ->write (sprintf ('<info>%s: </info> ' , $ file ->getPath ()));
45+ $ result ['success ' ] ? $ io ->write ($ result ['output ' ]) : $ io ->writeError (sprintf ('<error>%s</error> ' , $ result ['error ' ]));
4446
4547 if ($ result ['success ' ] !== true ) {
4648 $ this ->throwError ($ action , $ io );
@@ -82,6 +84,7 @@ protected function checkPrettier(string $file, string $prettierCommand, string $
8284 return [
8385 'success ' => $ result ->isSuccessful (),
8486 'output ' => $ result ->getStdOut (),
87+ 'error ' => $ result ->getStdErr (),
8588 ];
8689 }
8790}
0 commit comments