New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed pre-commit hook script #10287

Merged
merged 2 commits into from Sep 5, 2018
Jump to file or symbol
Failed to load files and symbols.
+9 −11
Diff settings

Always

Just for now

Next

Fixed pre-commit hook script

  • Loading branch information...
mickaelandrieu committed Sep 4, 2018
commit 485bd16f223d038754ddaf3fd5dcad4c38ac0403
@@ -24,18 +24,16 @@
* International Registered Trademark & Property of PrestaShop SA
*/
if (file_exists('.git/hooks/pre-commit')) {
copy('.git/hooks/pre-commit', '.git/hooks/pre-commit.back');
echo "A Git precommit file was found, a backup was created.\n";
}
if (file_exists('pre-commit')) {
file_put_contents(
'.git/hooks/pre-commit',
file_get_contents(__DIR__.'/pre-commit'),
FILE_APPEND | LOCK_EX
);
chmod('.git/hooks/pre-commit', 0750);
echo "\e[32mPre-commit Hook has been installed.\e[0;m\n";
}
file_put_contents(
'.git/hooks/pre-commit',
file_get_contents(__DIR__.'/pre-commit'),
FILE_APPEND | LOCK_EX
);
chmod('.git/hooks/pre-commit', 0750);
echo "\e[32mPre-commit Hook has been installed.\e[0;m\n";
@@ -27,6 +27,6 @@ do
done
echo "Running PHP CS Fixer..."
php bin/php-cs-fixer fix
php ./vendor/bin/php-cs-fixer fix
exit $?
ProTip! Use n and p to navigate between commits in a pull request.