jish / pre-commit

A slightly improved pre-commit hook for git
https://jish.github.io/pre-commit/
Other
796 stars 96 forks source link

trouble installing #154

Closed DarylThayil closed 10 years ago

DarylThayil commented 10 years ago

I am in my git repo folder :/

Daryls-MacBook-Pro-2:clover darylthayil$ pre-commit install
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1375:in `initialize': No such file or directory - .git/hooks/pre-commit (Errno::ENOENT)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1375:in `open'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1375:in `block in copy_file'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1374:in `open'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1374:in `copy_file'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:477:in `copy_file'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:394:in `block in cp'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1552:in `block in fu_each_src_dest'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1568:in `fu_each_src_dest0'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1550:in `fu_each_src_dest'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:393:in `cp'
    from /Library/Ruby/Gems/2.0.0/gems/pre-commit-0.16.3/lib/pre-commit/installer.rb:29:in `install'
    from /Library/Ruby/Gems/2.0.0/gems/pre-commit-0.16.3/lib/pre-commit/cli.rb:35:in `execute_install'
    from /Library/Ruby/Gems/2.0.0/gems/pre-commit-0.16.3/lib/pre-commit/cli.rb:20:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/pre-commit-0.16.3/bin/pre-commit:9:in `<top (required)>'
    from /usr/bin/pre-commit:23:in `load'
    from /usr/bin/pre-commit:23:in `<main>'
DarylThayil commented 10 years ago

Tried creating directory manually and install worked , but then on trying to run it had a fatal error no permission to exectute .git/hooks/pre-commit the dir I created after that i tried giving chmod permission 777 and still didnt work so I uninstalled removed dir reinstalled and am at starting point again

mpapis commented 10 years ago

@jish this should do it, release new version when you have some free time

jish commented 10 years ago

Released 0.17.0 https://rubygems.org/gems/pre-commit