DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41890>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41890

           Summary: exec > env > key value not set correctly.
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Build Process
        AssignedTo: dev@ant.apache.org
        ReportedBy: [EMAIL PROTECTED]


S:\auth\dev\auth3>ant -version
Apache Ant version 1.7.0 compiled on December 13 2006


I'm not sure if this is by design or not, but I can't find it doc'd and it does
cause some confusion.

Essentially, you can't set a path for an env var that does not contain a '\'.

For instance:
<env key="SystemDrive" path="c:"/>
Results in
SystemDrive=S:\auth\dev\auth3\c

Where s:\auth\dev\auth3 is your working directory.

To show this, it's easiest to create a target that allows you to view your env.
For another reason, I can't just launch a cmd window.  I don't know why. 
Perhaps this can be explained as well?

In any case, I create a target named taskmgr that spawns taskmgr with a new env
and just a couple of vars set.  See below.

So, launch the target and then view its env.
Do this by running a command prompt via taskmgr > file > run.
Then type set to view your env vars.


<target name="taskmgr">
  <exec dir="c:\windows\system32\" executable="c:\windows\system32\taskmgr.exe"
newenvironment="true" >
        
    <env key="junk" path="c:" />
    <env key="SystemDrive" value="c:"/>


env vars are...

COMSPEC=C:\windows\system32\cmd.exe
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS
PROMPT=$P$G
junk=S:\auth\dev\auth3\c
SystemDrive=c:

Note, junk is _incorrect_
Yet SystemDrive is correct.

Why do you need to use value to set c:
Isn't it a valid path?  And why is it appended otherwise?
Is this doc'd?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to