Phing - How to interact with the shell
If you ever wonder how to answer prompts of commands you execute through the Phing exec
task, here is the solution. It's easy but since I didn't find it explicitly documented anywhere I thought I'd write it down in public:
<target name="interact">
<exec command="somecommand" passthru="true" />
</target>
The solution is to set passthru="true"
. Then the prompts will be displayed by phing and you can answer them as if you were calling the commands directly in the shell. Works on Linux and Windows.
Written by Markus Hausammann
Related protips
2 Responses
thanks a lot ... i was checking for this functioanlity i have also tried different things but this parameter releived me.
Thanks a lot once again :) :)
over 1 year ago
·
You're welcome, please upvote the protip.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Phing
Authors
Related Tags
#phing
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#