#639 Quoted arguments not parsed correct from response file

0.85
closed-fixed
Core (183)
5
2014-08-16
2007-06-13
No

It is possible to put an item in a response file (the @<file> operation) which does not work, but the same setting does work from the command line.

Given the following build file:

<?xml version="1.0"?>
<project name="PropertyTest" default="test" basedir=".">
<description>A test of the command file handling.</description>

<target name="test">
<echo message="Item = ${variable}"/>
</target>
</project>

From the command line, the following works as expected:

nant "-D:variable=Some Variable With Spaces"

I.e. the output reads as follows:

NAnt 0.85 (Build 0.85.2478.0; release; 10/14/2006)
Copyright (C) 2001-2006 Gerry Shaw
http://nant.sourceforge.net

Buildfile: file:///D:/NextGenSvn/tools/nant/bin/test.build
Target framework: Microsoft .NET Framework 2.0
Target(s) specified: test

test:

[echo] Item = Some Variable With Spaces

BUILD SUCCEEDED

Putting the same string ("-D:variable=Some Variable With Spaces") into a response file, and invoking Nant using nant @responsefile.txt, results in the following output:

NAnt 0.85 (Build 0.85.2478.0; release; 10/14/2006)
Copyright (C) 2001-2006 Gerry Shaw
http://nant.sourceforge.net

Buildfile: file:///D:/NextGenSvn/tools/nant/bin/test.build
Target framework: Microsoft .NET Framework 2.0
Target(s) specified: "-D:variable=Some Variable With Spaces"

BUILD FAILED

Target '"-D:variable=Some' does not exist in this project.

Total time: 0 seconds.

The expected result is that either mechanism to set the variable is valid.

Discussion

  • Gert Driesen

    Gert Driesen - 2007-06-16

    Logged In: YES
    user_id=707851
    Originator: NO

    This is now fixed in CVS.

    Thanks for the report!

     
  • Gert Driesen

    Gert Driesen - 2007-06-16
    • assigned_to: nobody --> drieseng
    • summary: Valid setting from command line not valid in response file --> Quoted arguments not parsed correct from response file
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks