ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36347] New: - <exec> task's dir attribute not honored if current directory is the same as the dir attribute.
Date Wed, 24 Aug 2005 21:25:13 GMT
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: moobob42@yahoo.com


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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message