Class: Papa::Command::Git::Fetch

Inherits:
Base
  • Object
show all
Defined in:
lib/papa/command/git/fetch.rb

Instance Attribute Summary

Attributes inherited from Base

#command, #exit_status, #silent, #stderr, #stdout

Instance Method Summary collapse

Methods inherited from Base

#cleanup, #failed?, #run, #success?

Constructor Details

#initialize(remote) ⇒ Fetch

Returns a new instance of Fetch.



7
8
9
10
11
# File 'lib/papa/command/git/fetch.rb', line 7

def initialize(remote)
  @remote = remote
  command = "git fetch #{remote}"
  super(command)
end

Instance Method Details

#failure_messageObject



13
14
15
16
17
18
# File 'lib/papa/command/git/fetch.rb', line 13

def failure_message
  super
  message = "Failed to fetch from #{@remote}. Please check your internet connection and try again."
  Helper::Output.stderr message
  message
end