class RHC::Commands::GitClone

Public Instance Methods

run(app_name) click to toggle source

TODO: Implement default values for arguments once ffranz has added context arguments argument :directory, “The name of a new directory to clone into”, [], :default => nil

# File lib/rhc/commands/git_clone.rb, line 18
def run(app_name)
  if has_git?
    rest_app = find_app
    dir = git_clone_application(rest_app)
    success "Your application Git repository has been cloned to '#{system_path(dir)}'"

    0
  else
    error "You do not have git installed. In order to fully interact with OpenShift you will need to install and configure a git client.#{RHC::Helpers.windows? ? ' We recommend this free application: Git for Windows - a basic git command line and GUI client http://msysgit.github.io/.' : ''}"
    2
  end
end