You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jose Alberto Fernandez <JF...@viquity.com> on 2000/11/29 07:59:41 UTC

[PATCH] Obtaining the environement variables and propagating them

Hi,
 
As promissed, here is a first shot at geting the environment and propagating
it properly
during the <exec*> operations.
 
The patch modifies Execute.java which is the lowest level. Added a new
attribute to ExecTask
"newenvironment='true'" if you do not want propagation.
 
Added attribute "environment='prefix'" to <property/> to indicate to load
the properties from the
environment:
 
   <property environment="ant.env" />
 
I have tested <property> which calls the methods on Execute to do the job,
so most should be
tested at this point. But I only have NT, someone needs to verify other
environments and in particular
set the correct values for the command on the MAC if there are any.
 
Hope is useful....
 
Jose Alberto


 

Re: [PATCH] Obtaining the environement variables and propagating them

Posted by Peter Donald <do...@apache.org>.
At 10:59  28/11/00 -0800, Jose  Alberto Fernandez wrote:
>As promissed, here is a first shot at geting the environment and propagating 
>it properly during the <exec*> operations.
>  
>The patch modifies Execute.java which is the lowest level. Added a new 
>attribute to ExecTask "newenvironment='true'" if you do not want propagation.
>
> Added attribute "environment='prefix'" to <property/> to indicate to load
the 
> properties from the environment:
>
>  
>   <property environment="ant.env" />
>  
> I have tested <property> which calls the methods on Execute to do the
job, so 
> most should be tested at this point. But I only have NT, someone needs to 
> verify other environments and in particular set the correct values for the 
>command on the MAC if there are any.

Okay finally I finally downloaded cygwin (It *is* a great environment) and
applied patch. I had to mod it to work under windows 9x. Could everyone
else have a look at Execute.getProcEnvCommand() for their respective
environment. 

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*