Skip to content

Commit

Permalink
Improve console output
Browse files Browse the repository at this point in the history
When pretty fails, its output does not end on a new line, displaying something like this:
```
ngdo@ngdo-portable:~$ pretty fail/
Unrecognized command 'fail/'
Available commands:
- pretty: runs an analysis (will not fix the code)
- pretty fix: fix as many errors as possible in the code
- pretty ci: runs an analysis in a continuous integration environment
- pretty help: displays this helpngdo@ngdo-portable:~$ 
```

This fix add an empty line to display this:
```
ngdo@ngdo-portable:~$ pretty fail/
Unrecognized command 'fail/'
Available commands:
- pretty: runs an analysis (will not fix the code)
- pretty fix: fix as many errors as possible in the code
- pretty ci: runs an analysis in a continuous integration environment
- pretty help: displays this help
ngdo@ngdo-portable:~$ 
```
  • Loading branch information
ngdo-pro committed Oct 3, 2018
1 parent 32a4b39 commit ef1e9ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pretty
Expand Up @@ -94,6 +94,7 @@ function assertPhpCodeSnifferIsInstalled($command)
echo <<<INSTRUCTIONS
ERROR: PHP CodeSniffer does not seem to be installed because the '$command' program cannot be found.
You can install it by following the instructions here: https://github.com/squizlabs/PHP_CodeSniffer#installation
INSTRUCTIONS;
exit(1);
}
Expand All @@ -105,6 +106,7 @@ function assertPhpCsFixerIsInstalled()
echo <<<'INSTRUCTIONS'
ERROR: PHP-CS-Fixer does not seem to be installed because the 'php-cs-fixer' program cannot be found.
You can install it by following the instructions here: https://github.com/FriendsOfPHP/PHP-CS-Fixer#installation
INSTRUCTIONS;
exit(1);
}
Expand All @@ -118,5 +120,6 @@ Available commands:
- pretty fix: fix as many errors as possible in the code
- pretty ci: runs an analysis in a continuous integration environment
- pretty help: displays this help
HELP;
}

0 comments on commit ef1e9ce

Please sign in to comment.