为什么这不会删除破坏的符号链接本身的任何想法?
<delete removeNotFollowedSymlinks="true">
<fileset followsymlinks="false" file="/some/path/to/broken/symlink" />
</delete>
或者我可以使用下面的内容,但我更愿意避免使用exec?
<exec executable="rm">
<arg value="-f"/>
<arg value="/some/path/to/broken/symlink" />
</exec>
答案 0 :(得分:2)
找到真正的方法......
<symlink failonerror="false" action="delete" link="/some/path/to/broken/symlink" />