Sha256: 5cf7d45501c095271c1c12cbd56794b80897aef9a4c6bdff734ad643ad89d486

Contents?: true

Size: 417 Bytes

Versions: 1

Compression:

Stored size: 417 Bytes

Contents

#!/usr/bin/env ruby

if system("which rvm > /dev/null")
  cmd = "rvm default do ruby -rrubygems "
else
  cmd = "ruby -rrubygems "
end

if !system("#{cmd} -rpre-commit -e '' 2> /dev/null")
  $stderr.puts "pre-commit: WARNING: Skipping checks because the pre-commit gem is not installed. (Did you change your Ruby version?)"
  exit(0)
end

cmd << %Q{-e "require 'pre-commit'; PreCommit.run"}

exit(system(cmd) ? 0 : 1)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pre-commit-0.4.0 templates/pre-commit-hook