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
140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/train/extras/command_wrapper.rb', line 140 def self.load(transport, ) if transport.os.unix? return nil unless LinuxCommand.active?() res = LinuxCommand.new(transport, ) msg = res.verify fail Train::UserError, "Sudo failed: #{msg}" unless msg.nil? res # only use powershell command for local transport. winrm transport # uses powershell as default elsif transport.os.windows? && transport.class == Train::Transports::Local::Connection PowerShellCommand.new(transport, ) end end |