Checking the result.Code prior to err in the if statement causes a panic if result is nil. It turns out the formatting of the error is already in IssueSSHCommandWithResult, so removing redundant code is enough to fix the issue. Logging the SSH result was also redundant, so I removed that as well.
173 KiB
173 KiB