def run
      parse_arguments

      case @options[:action]
      when :install, :uninstall
        install_or_uninstall
      when :template_dir
        print_template_directory_path
      when :sign
        sign
      when :run_all
        run_all
      end
    rescue Overcommit::Exceptions::ConfigurationSignatureChanged => ex
      puts ex
      exit 78 # EX_CONFIG
    rescue Overcommit::Exceptions::HookContextLoadError => ex
      puts ex
      exit 64 # EX_USAGE
    end
def run
      parse_arguments

      case @options[:action]
      when :install, :uninstall
        install_or_uninstall
      when :template_dir
        print_template_directory_path
      when :sign
        sign
      when :run_all
        run_all
      end
    rescue Overcommit::Exceptions::ConfigurationSignatureChanged => ex
      puts ex
      exit 78 # EX_CONFIG
    rescue Overcommit::Exceptions::HookContextLoadError => ex
      puts ex
      exit 64 # EX_USAGE
    end
rubocop:disable ClassLength