Modify

Ticket #187 (closed enhancement: fixed)

Opened 4 years ago

Last modified 2 years ago

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":

 http://us2.php.net/manual/en/function.exec.php

I'd like to propose that the "passthru" attribute when set to "true" make use of the PHP function "passthru":

 http://us2.php.net/manual/en/function.passthru.php

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

Hi Andrew,

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

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.

comment:4 Changed 2 years ago by mrook

(In [512]) Refs #187 - ExecTask attribute 'passthru' to make use of the PHP function 'passthru'

comment:5 Changed 2 years ago by mrook

  • Status changed from assigned to closed
  • Resolution set to fixed

The original 'passthru' attribute has been renamed to 'logoutput', the new 'passthru' attribute activates the passthru() function.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.