I am trying to execute a shell script, as in Ant:
<exec executable="bash" newenvironment="false" dir="./">
<arg value="script.sh">
</exec>
But when it runs the script, all references to environment variables, such as $ MY_VARIABLE, are returned as an empty string. How do I get around this? According to http://ant.apache.org/manual/Tasks/exec.html I believe the environment should be distributed. (I also understand that newenvironment defaults to false.)
Edit: I see an env element, but I see no way to pass the environment in bulk. Is there any way to do this?
source
share