Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ant 1.8.0 + delete task does not delete broken symbolic link

Tags:

ant

Any ideas why this does not remove the broken symlink itself?

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

Alternatively I could use the below, but I'd prefer to avoid exec?

<exec executable="rm">
  <arg value="-f"/>
  <arg value="/some/path/to/broken/symlink" />
</exec>

1 Answers

Found the real way to do it...

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

Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!