Exception: Tomo::SSH::ExecutableError

Inherits:
Error
  • Object
show all
Defined in:
lib/tomo/ssh/executable_error.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#host

Instance Method Summary collapse

Methods inherited from Error

raise_with

Methods included from Colors

enabled?

Instance Attribute Details

#executableObject

Returns the value of attribute executable.



6
7
8
# File 'lib/tomo/ssh/executable_error.rb', line 6

def executable
  @executable
end

Instance Method Details

#to_consoleObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/tomo/ssh/executable_error.rb', line 8

def to_console
  hint = if executable.to_s.include?("/")
           "Is the ssh binary properly installed in this location?"
         else
           "Is #{yellow(executable)} installed and in your #{blue('$PATH')}?"
         end

  <<~ERROR
    Failed to execute #{yellow(executable)}.
    #{hint}
  ERROR
end