Module: Aircana::CLI::DoctorHelpers::InstallCommands

Included in:
Aircana::CLI::Doctor
Defined in:
lib/aircana/cli/commands/doctor_helpers.rb

Constant Summary collapse

INSTALL_COMMANDS =
{
  "git" => {
    "macOS" => "brew install git",
    "Ubuntu/Debian" => "apt install git",
    "Other" => "https://git-scm.com/downloads"
  },
  "fzf" => {
    "macOS" => "brew install fzf",
    "Ubuntu/Debian" => "apt install fzf",
    "Other" => "https://github.com/junegunn/fzf#installation"
  },
  "bat" => {
    "macOS" => "brew install bat",
    "Ubuntu/Debian" => "apt install bat",
    "Other" => "https://github.com/sharkdp/bat#installation"
  },
  "fd" => {
    "macOS" => "brew install fd",
    "Ubuntu/Debian" => "apt install fd-find",
    "Other" => "https://github.com/sharkdp/fd#installation"
  }
}.freeze

Instance Method Summary collapse

Instance Method Details

#install_command(tool) ⇒ Object



108
109
110
111
# File 'lib/aircana/cli/commands/doctor_helpers.rb', line 108

def install_command(tool)
  os = detect_os
  INSTALL_COMMANDS.dig(tool, os) || INSTALL_COMMANDS.dig(tool, "Other") || "Check package manager"
end