lib/cocoapods/command/setup.rb
# Enables the pre-commit hook of the master repo.
#
# @note   The hook is enabled in this way because the specs run with the
#         master repo as a submodule.
#
# @return [void]
#
Enables the pre-commit hook of the master repo.
Enables the pre - commit hook of the master repo .
def enable_pre_commit_hooks
        if (master_repo_dir + '.git/hooks').exist?
          hook = master_repo_dir + '.git/hooks/pre-commit'
          hook.open('w') { |f| f << "#!/bin/sh\nrake lint" }
          `chmod +x '#{hook}'`
        end
      end
def enable_pre_commit_hooks if ( master_repo_dir + '.git/hooks' ) . exist? hook = master_repo_dir + '.git/hooks/pre-commit' hook . open ( 'w' ) { | f | f << "#!/bin/sh\nrake lint" } ` chmod +x ' #{ hook } ' ` end end
Enables the pre-commit hook of the master repo.
Enables the pre - commit hook of the master repo .
None
void
note
The hook is enabled in this way because the specs run with the master repo as a submodule.
The hook is enabled in this way because the specs run with the master repo as a submodule .