Class: Train::Extras::CommandWrapper
- Inherits:
-
Object
- Object
- Train::Extras::CommandWrapper
- Defined in:
- lib/train/extras/command_wrapper.rb
Class Method Summary collapse
Class Method Details
.load(transport, options) ⇒ Object
127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/train/extras/command_wrapper.rb', line 127 def self.load(transport, ) if transport.os.unix? return nil unless LinuxCommand.active?() res = LinuxCommand.new(transport, ) verification_res = res.verify if verification_res msg, reason = verification_res raise Train::UserError.new("Sudo failed: #{msg}", reason) end res end end |