From 632c01d0422cc1bcea7a7c672a63621ce5de5fa3 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Sat, 24 Oct 2009 06:25:03 +0000 Subject: [PATCH] Only store the command's output with no decoration in sshexec's outputproperty if the command attribute is used. PR 48040 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@829311 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 5 +++++ docs/manual/OptionalTasks/sshexec.html | 8 +++++--- .../apache/tools/ant/taskdefs/optional/ssh/SSHExec.java | 1 - 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/WHATSNEW b/WHATSNEW index f1cd421fe..5c1b0b970 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -512,6 +512,11 @@ Fixed bugs: resources but not filesets. Bugzilla Report 48035. + * 's outputproperty was prefixed by the executed command + when the command attribute has been used, breaking backwards + compatibility to Ant 1.7.0. + Bugzilla Report 48040. + Other changes: -------------- diff --git a/docs/manual/OptionalTasks/sshexec.html b/docs/manual/OptionalTasks/sshexec.html index c8aa6ff42..4b8a85544 100644 --- a/docs/manual/OptionalTasks/sshexec.html +++ b/docs/manual/OptionalTasks/sshexec.html @@ -128,7 +128,9 @@ and won't work with versions of jsch earlier than outputproperty The name of a property in which the output of the - command should be stored. + command should be stored. If you use the commandResource + attribute, each command's output will be prefixed by the + command itself. No @@ -144,7 +146,7 @@ and won't work with versions of jsch earlier than A file from which the executed command's standard input is taken. This attribute is mutually exclusive with the inputstring attribute.
- When executing more than one command via commandRessource, input + When executing more than one command via commandResource, input will be read for each command. since Ant 1.8.0 No @@ -154,7 +156,7 @@ and won't work with versions of jsch earlier than A string which serves as the input stream for the executed command. This attribute is mutually exclusive with the input attribute.
- When executing more than one command via commandRessource, input + When executing more than one command via commandResource, input will be read for each command. since Ant 1.8.0 No diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java index 481ffe5f1..7bbc1499d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java @@ -191,7 +191,6 @@ public class SSHExec extends SSHBase { /* called once */ if (command != null) { log("cmd : " + command, Project.MSG_INFO); - output.append(command).append(" : "); executeCommand(session, command, output); } else { // read command resource and execute for each command try {