Ticket #187 (closed enhancement: fixed)
ExecTask attribute "passthru" to make use of the PHP function "passthru"
| Reported by: | andrew.hsu@… | Owned by: | mrook |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.4.0RC1 |
| Component: | phing-tasks-system | Version: | 2.3.0 |
| Keywords: | ExecTask passthru exec | Cc: |
Description
I'm setting this ticket type initially to "enhancement" because I feel it may have been deliberate to have the "passthru" attribute behave the way it does in phing 2.3.0.
However, it was a bit misleading to me for when I searched for some way to have ExecTask allow the shell command it was executing to stream the command output to stdout. The "passthru" attribute seems to only change the output of the shell command after all of it has been collected in a buffer because it makes use of the PHP function "exec":
I'd like to propose that the "passthru" attribute when set to "true" make use of the PHP function "passthru":
Because there are many situations where the command that is executed by ExecTask may prompt the user for input and because of the behaviour of "exec", the user sees no prompt until the buffer has been flushed to stdout.
Let me know if you need a patch to the ExecTask code or if you need more details on the request for enhancement.
Cheers, Andrew
Attachments
Change History
comment:1 Changed 4 years ago by mrook
- Owner changed from hans to mrook
- Status changed from new to assigned
comment:3 Changed 3 years ago by marcellosales
I'm facing this problem... Phing hangs on that until the process finishes and dumps the files (if I'm generating files) into the disk..
comment:4 Changed 2 years ago by mrook
The 'passthru' variable was deliberate (see http://phing.tigris.org/ds/viewMessage.do?dsForumId=1082&dsMessageId=538789), the naming is slightly misleading.

Hi Andrew,
sorry for the late response, but a patch would be nice!