Commits

mwent committed d4de46f

BAM-12368 ssh job fails when command is executed successfully - fixing typo

Comments (0)

Files changed (1)

src/main/java/com/atlassian/bamboo/plugins/scp/SshTask.java

                 buildLogger.addBuildLogEntry("Command: exit = " + command.getExitStatus());
                 buildLogger.addBuildLogEntry("'" + ssh_command + "' was run.");
                 // missing command status currently treated as success
-                if (command != null && command.getExitStatus() != 0) //STATUS_OK
+                if (command.getExitStatus() != null && command.getExitStatus() != 0) //STATUS_OK
                 {
                     buildLogger.addBuildLogEntry("Failing SSH task as the SSH command returned non-zero exit code.");
                     return taskResultBuilder.failedWithError().build();