lib/ridley/host_connector/winrm.rb in ridley-1.2.3 vs lib/ridley/host_connector/winrm.rb in ridley-1.2.4

- old
+ new

@@ -78,10 +78,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. #