Bugs item #1080346, was opened at 2004-12-07 01:35
Message generated for change (Comment added) made by drieseng
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1080346&group_id=31650

Category: Tasks
Group: cvs
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Craig Green (cagreen)
>Assigned to: Gert Driesen (drieseng)
Summary: Quotes in path cause System.ArgumentException

Initial Comment:
I.) Problem

A "System.ArgumentException: Illegal characters in 
path" exception will be thrown if a user attempts to 
perform a <cvs-checkout> task when the path to 
their CVS client is enclosed in double-quotes.


II.) Detail

A Windows user may have a PATH variable 
containing quotes such as:

PATH=C:\NAnt\bin;"C:\Program Files\GNU\WinCvs 
1.3\CVSNT";C:\WINDOWS\system32;C:\WINDOWS

Strictly speaking, the quotes are not necessary but 
they could be present for a variety of reasons: they 
were introduced by tab completion, the user has 
programs that don't properly parse the PATH, etc.

The problem for NAnt occurs when 
AbstractSourceControlTask.DeriveFullPathFromEnv() 
calls System.IO.Path.Combine(), passing it the path 
to the CVS client exactly as it appears in the PATH.  
Since Path.InvalidPathChars includes double-quotes, 
Path.Combine() throws the exception.


III.) Solution

This is not really a fault in NAnt, but instead of 
throwing an exception on a working PATH, it is a 
simple matter to strip the quotes before calling 
Path.Combine.

I have attached a patch to revision 1.20 of 
NAnt.SourceControl\Tasks\AbstractSourceControlTask
.cs which implements this change.


Thanks,
-Craig Green


----------------------------------------------------------------------

>Comment By: Gert Driesen (drieseng)
Date: 2004-12-22 22:17

Message:
Logged In: YES 
user_id=707851

This issue is now fixed in cvs.

Thanks for the report !

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1080346&group_id=31650


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
nant-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to