user110684
user110684

Reputation:

Ant 1.8.0 + delete task does not delete broken symbolic link

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>

Upvotes: 4

Views: 806

Answers (1)

user110684
user110684

Reputation:

Found the real way to do it...

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

Upvotes: 2

Related Questions