lib/ridley/host_connector/winrm.rb in ridley-1.0.2 vs lib/ridley/host_connector/winrm.rb in ridley-1.0.3

- old
+ new

@@ -79,10 +79,14 @@ else log.info "Successfully ran WinRM command on: '#{host}' as: '#{user}', but it failed" end end ensure - command_uploaders.map(&:cleanup) + begin + command_uploaders.map(&:cleanup) + rescue ::WinRM::WinRMHTTPTransportError => ex + log.info "Error cleaning up leftover Powershell scripts on some hosts" + end end # Returns the command if it does not break the WinRM command length # limit. Otherwise, we return an execution of the command as a batch file. #