Hi Gert,

I don't have a repro for this yet on my side (I'm not at my workplace,
where it happened).

I opened a bug here :
http://sourceforge.net/tracker/index.php?func=detail&aid=1056010&group_id=31650&atid=402868
altogether with the details provided by Rutger.

cheers

Thibaut

On Thu, 28 Oct 2004 07:28:08 +0200, Gert Driesen
<[EMAIL PROTECTED]> wrote:
> Rutger, Thibaut,
> 
> Do you have a repro for this ?
> 
> There are indeed tasks that modify the current workding directory, but the
> original working directory should definitely be restored after completion of
> the task.
> 
> Gert
> 
> 
> 
> ----- Original Message -----
> From: "Rutger Dijkstra" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, October 27, 2004 6:20 PM
> Subject: [Nant-users] RE: Regression on current directory ?
> 
> > Similar observation here: some tasks appear to muck about with the current
> > workingdir.
> > nunit2 did it for me. Consequently, my ndoc generated documentation ended
> up
> > in a sub-folder of the folder containing my unit-tests.
> > I fixed this by setting all directory-properties to absulute paths. Not
> > pretty
> >
> > rutger
> >
> >
> >
> >
> > > Date: Wed, 20 Oct 2004 10:37:02 +0200
> > > From: =?ISO-8859-1?Q?Thibaut_Barr=E8re?= <[EMAIL PROTECTED]>
> > > Reply-To: =?ISO-8859-1?Q?Thibaut_Barr=E8re?= <[EMAIL PROTECTED]>
> > > To: "Nant-Users (E-mail)" <[EMAIL PROTECTED]>
> > > Subject: [Nant-users] Regression on current directory ?
> > >
> > > Hi again,
> > >
> > > did anyone had issues with current path (ie the place where you are
> > > when a task is finished) in their script after a recent upgrade of
> > > nant ?
> > >
> > > I did not investigate much already as I don't have time for this now
> > > (I used a simple workaround), but after upgrading nant (previous
> > > release was 5 month old) a user script function I called from my build
> > > script is lost.
> > >
> > > The function assumes that we're in the directory where the nant script
> > > was started, and rely on this for relative paths resolution. This was
> > > working with the previous release I used, but now I'm located
> > > somewhere else (probably in a folder where a previous task stopped).
> > >
> > > I'm not trying to understand fully what's happening today, but I'm
> > > interested in any pointer or similar issue, as there is definitely a
> > > change in behaviour here.
> > >
> > > cheers
> > >
> > > Thibaut
> > >
> > > nb : I know the best way to lock this issue would probably be to
> > > access the nant properties from inside my function to get the base
> > > directory, but are we supposed to do it this way ?
> > >
> > >
> > > --__--__--
> > >
> > > Message: 3
> > > Date: Wed, 20 Oct 2004 10:59:18 +0200
> > > From: =?ISO-8859-1?Q?Thibaut_Barr=E8re?= <[EMAIL PROTECTED]>
> > > Reply-To: =?ISO-8859-1?Q?Thibaut_Barr=E8re?= <[EMAIL PROTECTED]>
> > > To: "Nant-Users (E-mail)" <[EMAIL PROTECTED]>
> > > Subject: [Nant-users] Re: Regression on current directory ?
> > >
> > > More info; part of the script I use below :
> > >
> > > ---------------------
> > > <exec program="cmd.exe" commandline="/c cd"/>
> > > <foreach item="File" property="filename">
> > > <in>
> > > <items refid="projects.all"/>
> > > </in>
> > > <do>
> > > <exec program="cmd.exe" commandline="/c cd"/>
> > > <echo message="filename is ${filename}"/>
> > > <exec program="cmd.exe" commandline="/c cd"/>
> > > <if
> > > test="${utils::must-publish-project(filename,'projects.xml')}">
> > > </if>
> > > </do>
> > > </foreach>
> > > ---------------------
> > >
> > > The beginning of the must-publish-project function :
> > >
> > > ---------------------
> > > [Function("must-publish-project")]
> > > public static bool MustPublishProject(string projectfilename,string
> > > xmlprojectsdescriptor)
> > > {
> > > Log(Level.Info,"Current directory is
> > > {0}",Directory.GetCurrentDirectory());
> > > string projectname =
> > > Path.GetFileNameWithoutExtension(projectfilename);
> > > XmlDocument doc = new XmlDocument();
> > > doc.Load(xmlprojectsdescriptor);
> > > ---------------------
> > >
> > >
> > > The output is a bit surprising :
> > >
> > > ---------------------
> > >
> > > first cmd /c cd call :
> > >      [exec] C:\MySource\BuildServer
> > > second cmd /c cd call (in the foreach loop)
> > >      [exec] C:\MySource\BuildServer
> > > the echo filename :
> > >      [echo] filename is
> > > c:\MySource\MyCompany.Services.MyPackage\MyCompany.Services.MyServ
> > > ice\MyCompany.Services.MyService.csproj
> > > third cmd call :
> > >      [exec] C:\MySource\BuildServer
> > > but then, from inside the function :
> > > Current directory is
> > > c:\MySource\MyCompany.Services.MyPackage\MyCompany.Services.MyServ
> > > ice.Test\bin\Release
> > >
> > > BUILD FAILED - 1 non-fatal error(s), 2 warning(s)
> > >
> > > C:\MySource\BuildServer\default.build(247,6):
> > > Function call failed.
> > > Expression: ${utils::must-publish-project(filename,'projects.xml')}
> > >               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > >     Could not find file
> > > "c:\MySource\MyCompany.Services.MyPackage\MyCompany.Services.MySer
> > > vice.Test\bin\Release\projects.xml".
> > >
> > >
> > > The xml file cannot be loaded properly because the current folder is
> > > not what is expected.
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.733 / Virus Database: 487 - Release Date: 2004-08-02
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by:
> > Sybase ASE Linux Express Edition - download now for FREE
> > LinuxWorld Reader's Choice Award Winner for best database on Linux.
> > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> > _______________________________________________
> > Nant-users mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/nant-users
> >
> >
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users
>


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to