Ant 1.8.0 + delete task does not delete a broken symbolic link

Any ideas why this doesn't fix the broken symbolic link?

<delete removeNotFollowedSymlinks="true">
    <fileset followsymlinks="false" file="/some/path/to/broken/symlink" />
</delete>

Alternatively, I could use below, but would I rather avoid exec?

<exec executable="rm">
  <arg value="-f"/>
  <arg value="/some/path/to/broken/symlink" />
</exec>
+3
source share
1 answer

Found a real way to do this ...

<symlink failonerror="false" action="delete" link="/some/path/to/broken/symlink" />
+2
source

Source: https://habr.com/ru/post/1751316/


All Articles