Class: Ronin::Repos::CLI::Commands::Install Private

Inherits:
Ronin::Repos::CLI::Command show all
Includes:
Core::CLI::Logging
Defined in:
lib/ronin/repos/cli/commands/install.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Installs a git repository into the cache directory.

Usage

ronin-repos install [options] [REPO]

Options

-C, --cache-dir DIR              Overrides the default cache directory
-h, --help                       Print help information

Arguments

URI                              URI of the git repository

Instance Attribute Summary

Attributes inherited from Ronin::Repos::CLI::Command

#cache_dir

Instance Method Summary collapse

Methods inherited from Ronin::Repos::CLI::Command

#initialize

Constructor Details

This class inherits a constructor from Ronin::Repos::CLI::Command

Instance Method Details

#run(uri) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Runs the ronin-repos install command.

Parameters:

  • uri (String)

    The repository's git URI to install from.



63
64
65
66
67
68
69
# File 'lib/ronin/repos/cli/commands/install.rb', line 63

def run(uri)
  log_info "Installing repository from #{uri} ..."
  cache_dir.install(uri)
rescue CommandNotInstalled, CommandFailed => error
  print_error(error.message)
  exit(-1)
end