https://issues.apache.org/bugzilla/show_bug.cgi?id=48040
Summary: outproperty gets filled in with "command : output"
Product: Ant
Version: 1.7.1
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: regression
Priority: P2
Component: Optional Tasks
AssignedTo: [email protected]
ReportedBy: [email protected]
Let's say you have the following task snippet:
<target name="testsshexec">
<sshexec host="unixbox"
command="echo "test""
trust="yes"
username="user"
password="user
outputproperty="outprop"
/>
<echo message="Output from sshexec : ${outprop}"/>
</target>
When executing this with Ant 1.7.0, the outputproperty "outprop" was getting
filled in with the output of the command, the string "test" for say in this
example.
Now with Ant 1.7.1, the same code makes the outputproperty "outprop" getting
filled in with the string "echo "test" : test", where the sshexec task is
repeating the command given to the "command" attribute.
This is a regression as the outputproperty cannot be used directly within the
ant build file as it contains unwanted stuff rather than just the output of the
command.
I identified that the regression happened between revisions 577765 and 581576
with the correction of "open session once for a command resource not each
command".
Thanks for looking into it.
The correction looks very simple, one just need to remove the code at line 194
of SSHExec.java. (I'm looking at latest SVN SSHExec.java rev. 772543).
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.