Following is a section of my build.xml file -
<echo level="warning">Flow 1</echo>
<exec command="sudo su auto_deploy" dir="${dir.jenkins_base}/${dir.scratchpad}" />
<echo level="warning">Flow 2</echo>
And on running phing
while logged in as user auto_deploy or some other user, the output is -
[echo] Flow 1
Something seems to be wrong with the sudo su
command.
However, if I simply run sudo su auto_deploy
from command line, it works regardless of which user I am currently logged in as.