Browse Source

honor failonerror on connection problems. PR 46829.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@772543 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 16 years ago
parent
commit
cba01025c0
2 changed files with 15 additions and 2 deletions
  1. +4
    -0
      WHATSNEW
  2. +11
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java

+ 4
- 0
WHATSNEW View File

@@ -367,6 +367,10 @@ Fixed bugs:
that are already signed.
Bugzilla Report 46891.

* <sshexec> now again honors failonerror in the face of connection
errors.
Bugzilla Report 46829.

Other changes:
--------------
* A HostInfo task was added performing information on hosts, including info on


+ 11
- 2
src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java View File

@@ -206,11 +206,20 @@ public class SSHExec extends SSHBase {
}
FileUtils.close(br);
} catch (IOException e) {
throw new BuildException(e);
if (getFailonerror()) {
throw new BuildException(e);
} else {
log("Caught exception: " + e.getMessage(),
Project.MSG_ERR);
}
}
}
} catch (JSchException e) {
throw new BuildException(e);
if (getFailonerror()) {
throw new BuildException(e);
} else {
log("Caught exception: " + e.getMessage(), Project.MSG_ERR);
}
} finally {
if (outputProperty != null) {
getProject().setNewProperty(outputProperty, output.toString());


Loading…
Cancel
Save