Bug 50270 - No way to control whether SSHExec prints output to stdout
Summary: No way to control whether SSHExec prints output to stdout
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.8.2
Hardware: All All
: P1 blocker (vote)
Target Milestone: 1.9.0
Assignee: Ant Notifications List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2010-11-14 23:19 UTC by Isaac Shabtay
Modified: 2013-02-18 16:18 UTC (History)
1 user (show)



Attachments
Allow "suppressStdout" (1.85 KB, text/plain)
2010-11-14 23:19 UTC, Isaac Shabtay
Details
A complete tested SSHExec class with suppressSystemOut attribute (14.11 KB, patch)
2013-02-12 07:00 UTC, Sudheer Chigurupati
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Isaac Shabtay 2010-11-14 23:19:01 UTC
Created attachment 26296 [details]
Allow "suppressStdout"

Currently, SSHExec prints the exec's output to stdout regardless of whether the user asked for the output to be stored in a property, or in a file. This leads to undesirable results when the output is very long; if I'm writing an Ant buildfile and would like output to be redirected to a file, in 99.99% of the cases I would *not* like to see that very same output in stdout, especially when that output is long.

I suggest adding a property called "suppressStdout" (defaults to "false") to control this.

I have attached a patch to SSHExec; regrettably can't afford the time to thoroughly test it but it looks simple enough.
Comment 1 Sudheer Chigurupati 2013-02-12 07:00:33 UTC
Created attachment 29939 [details]
A complete tested SSHExec class with suppressSystemOut attribute

My sincere contribution to Apache to resolve this bug
Comment 2 Antoine Levy-Lambert 2013-02-18 16:18:25 UTC
committed. Thanks Isaac and Sudheer for your contributions.