From dev-return-74866-apmail-ant-dev-archive=ant.apache.org@ant.apache.org Mon Sep 18 14:46:40 2006 Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 58636 invoked from network); 18 Sep 2006 14:46:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Sep 2006 14:46:39 -0000 Received: (qmail 7066 invoked by uid 500); 18 Sep 2006 14:46:38 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 6908 invoked by uid 500); 18 Sep 2006 14:46:38 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 6897 invoked by uid 99); 18 Sep 2006 14:46:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Sep 2006 07:46:38 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of ddevienne@gmail.com designates 64.233.182.186 as permitted sender) Received: from [64.233.182.186] (HELO nf-out-0910.google.com) (64.233.182.186) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Sep 2006 07:46:28 -0700 Received: by nf-out-0910.google.com with SMTP id x29so2619891nfb for ; Mon, 18 Sep 2006 07:45:24 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CkejEi28du+4ZQvOyde4vuxRvID96JvwX8LlAlf6OKsF/sOGyY/X6nWQVxgPjiSeeGOP8JPXLZN9BQ1DLPGKAgwgzlgatujIChiLjwWKVmncogdTJobKzasxMlHIjrqnXInNS5s6+aUzQ33EIw/3W/BrRKAEXZSAD5xP9muf87s= Received: by 10.49.41.18 with SMTP id t18mr16994190nfj; Mon, 18 Sep 2006 07:45:23 -0700 (PDT) Received: by 10.49.64.15 with HTTP; Mon, 18 Sep 2006 07:45:23 -0700 (PDT) Message-ID: <255d8d690609180745p24881528q29baf802c9ee2738@mail.gmail.com> Date: Mon, 18 Sep 2006 09:45:23 -0500 From: "Dominique Devienne" To: "Ant Developers List" Subject: Re: svn commit: r446979 - in /ant/core/trunk: CONTRIBUTORS WHATSNEW contributors.xml src/main/org/apache/tools/ant/taskdefs/Execute.java In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060916234831.B4E841A981C@eris.apache.org> <255d8d690609180624xc28e2d3kda678986142d6c08@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > Thanks for the comments, it is always nice for people > to check the code - I mentioned that this patch was > the one that I was a little worried about. And thanks to you for all the work in BugZilla! Impressive!!! > 1) > The code does not export the lower case version > of the env variable that the user passed in, the > lower case version is only used for comparision > purposes. Cool. I can't look at the whole code right now, so was only going by the diff. I know that the app that produces these emails includes a link to online diffs when they are too large, instead of inline in the mail, but having a link all the time would be valuable IMHO. > Path is ${env.PATH} In my experience, this is likely to fail to display the Path, since it may not be spelled PATH, but Path, or path, etc... That's why I had a custom task that loaded the name and value of the path in two ptys: os.path.name and os.path. Allowed me to write cross-platform builds much more easily. That task defined other ptys like os.libpath.name and os.libpath, etc... For example, on Windows, os.libpath.name contained "Path" (or "PATH", or whatever the current form of this guy), but on Linux it was LD_LIBRARY_PATH. > The one thing that is infurating is that "Path" can be "PATH" or "path" > or whatever is the whim of the windows machine, and > it is difficult to write an ant script that work correctly > when using , I know. That's why I created that task. > perhaps we could provide a touppercase=yes/no option to > , or provide > a "${getenv:} prefix to ${} expansion to correspond > to java(1.1-, 5+) System.getenv(key). Why not. That could be handy. We have yet to officialize and document this mechanism though, no? > Note that getenv() is case-insensitive: > > > Didn't know that. > One change that could be made would be > to ignore the casiness of the key in the > and use the casiness of the key in the current env, it is present. Yes, this would correspond precisely to what I was doing. I'm +1 to this. I was using for example, to prepend ${basedir}/bin to the path, the following code: It doesn't solve though the case (upper or lower, or mix) with which you must refer to the var using the ${env.xyz} property notation. Unless we add an attribute to , as you mention, to force the names to lower or upper case. (combined with the change you described above. The two are be linked). Otherwise you can't know whether to use ${env.PATH} or ${env.Path}, etc... --DD --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org