Created
June 22, 2012 07:00
-
-
Save naoty/2970881 to your computer and use it in GitHub Desktop.
binding.pryが含まれていればコミットを中止するフックスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# check binding.pry | |
cached_files = `git diff --cached --name-only` | |
if cached_files.split($/).any? { |path| File.read(path).include?('binding.pry') } | |
puts 'ERROR: binding.pry is found.' | |
exit 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment