ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Bug 3129
Date Tue, 10 Sep 2002 06:18:08 GMT
On Mon, 9 Sep 2002, Dominique Devienne <DDevienne@lgc.com> wrote:

> You can get the absolute pathname of your executable on Win32 using:
> 
> <available property="ssh.exe" file="ssh.exe" filepath="${env.Path}"
> />
> 
> and use ${ssh.exe} thereafter.

Are you sure?

I'd think this property would be either unset or "true" after that
task.  Yep:

[bodewig@bodewig bodewig]$ cat > /tmp/ssh.xml 
<project default="foo">
  <target name="foo">
    <property environment="env"/>
    <available property="ssh" file="ssh" filepath="${env.PATH}"/>
    <echo>${ssh}</echo>
  </target>
</project>
[bodewig@bodewig bodewig]$ ant -f /tmp/ssh.xml -verbose
Apache Ant version 1.6alpha compiled on September 9 2002
Buildfile: /tmp/ssh.xml
...
foo:
 [property] Loading Environment env.
[available] Found: ssh in /usr/bin
     [echo] true

BUILD SUCCESSFUL
Total time: 3 seconds

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message