Class: WordPressTools::WPCLICore

Inherits:
Thor
  • Object
show all
Includes:
CLIHelper
Defined in:
lib/wordpress_tools/wp_cli_core.rb

Instance Method Summary collapse

Methods included from CLIHelper

#error, #executable_bit_command, #git_installed?, #info, #move_command, #run_command, #success, #unzip, #void, #warning

Instance Method Details

#installObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/wordpress_tools/wp_cli_core.rb', line 6

def install
  return unless overwrite?

  download
  move
  make_executable

  if installed?
    success("WP-CLI installed")
    check_bash_path || warning("Please, add #{install_path} to your shell '$PATH'")
  else
    error("Could not install WP-CLI")
  end
end