pre-commit 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pre-commit/checks.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f77f88e6c0af094767d24fcf57638e6ee76c53c
|
4
|
+
data.tar.gz: 18b897619fd17d93626612e88bb1b578647bc0fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de510f60565ce61bc92cfcc906bde870b9c26076b9032bd080dff889cace9d8f34646d82ff5221dbcf87ddca72097be9458d5a03a52dfac3ebcebcf5567014c8
|
7
|
+
data.tar.gz: 75c654038f334d941c0067cf1e3aaf64800981c65c336fec0c533460b09b095394d9a01d19260a162f5c4c68a7a9d24a98bd1e2c2683352f82c32a0b41b6706e
|
data/lib/pre-commit/checks.rb
CHANGED
@@ -77,9 +77,11 @@ module PreCommit
|
|
77
77
|
staged_files = Utils.staged_files
|
78
78
|
errors = checks_to_run.map { |cmd| cmd.call(staged_files.dup) }.compact
|
79
79
|
if errors.any?
|
80
|
-
puts "pre-commit: Stopping commit because of errors."
|
81
|
-
puts errors.join("\n")
|
82
|
-
puts
|
80
|
+
$stderr.puts "pre-commit: Stopping commit because of errors."
|
81
|
+
$stderr.puts errors.join("\n")
|
82
|
+
$stderr.puts
|
83
|
+
$stderr.puts "pre-commit: You can bypass this check using `git commit -n`"
|
84
|
+
$stderr.puts
|
83
85
|
exit 1
|
84
86
|
else
|
85
87
|
exit 0
|