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=36347>.
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=36347

           Summary: <exec> task's dir attribute not honored if current
                    directory is the same as the dir attribute.
           Product: Ant
           Version: 1.6.5
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: [EMAIL PROTECTED]


The <exec> task takes a dir attribute to set the working directory of the
executing program. This dir attribute is ignored on my Solaris 8 (sparc) system
if the dir attribute is the same as the current working directory and the build
script is not in the current working directory.

Example:
/tmp/build.xml
/tmp/foo -- current working directory
/tmp/bar -- arbitrary directory

build.xml contains:
<project basedir="." default="all" name="ExecTest">
    <target name="all">
        <exec dir="/tmp/foo" executable="/usr/bin/pwd" />
    </target>
</project>

>From /tmp/foo, run: ant -f ../build.xml
Buildfile: ../build.xml

all:
     [exec] /tmp

BUILD SUCCESSFUL
Total time: 0 seconds

Change to /tmp/bar and run the same program and you see the expected behavior.
Buildfile: ../build.xml

all:
     [exec] /tmp/foo

BUILD SUCCESSFUL
Total time: 0 seconds

It also works if you are in the same directory as the build file. I tested this
on Solaris, Linux, and Windows, and Solaris is the only platform where I see
this problem.

-- 
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