On 2019-10-17, Arnold, Thomas L. (LARC-D321)[LITES II] wrote:

> I'm having an issue with 1.10.7.  This behavior doesn't exist in 1.10.6.

>         <sshexec host="Server1" username="User" 
> keyfile="${user.home}/.ssh/id_rsa"
>                  output="/home/user/anthell/CheckHost-Server1.txt" 
> failonerror="true" append="true" verbose="false" suppresssystemout="false"/>

> Running this should leave me with a file CheckHost-Server1.txt containing 
> "OK", instead it fails creating the file:
> BUILD FAILED
> /home/user/anthell/build.xml:13: java.nio.file.NoSuchFileException: 
> /home/user/anthell/CheckHost-Server1.txt

> If I touch /home/user/anthell/CheckHost-Server1.txt before running, it works 
> fine and the file contains OK as expected.

Sounds like a bug, and most likely it is my fault.

https://github.com/apache/ant/commit/e3eb039ab638735390b3eff361ae06654f95b03c#diff-bb49f6b85622e35296971c8d0f10284a

looks like the culprit and I should have thrown in
StandardOpenOption.CREATE in addition to APPEND.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to