Skip to content

Commit

Permalink
Unlink file at destination before creating link
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Nov 20, 2010
1 parent 4f5e01d commit 0fb8e62
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/thor/actions/create_link.rb
Expand Up @@ -39,6 +39,7 @@ def invoke!
FileUtils.mkdir_p(File.dirname(destination))
# Create a symlink by default
config[:symbolic] ||= true
File.unlink(destination) if exists?
if config[:symbolic]
File.symlink(render, destination)
else
Expand Down

0 comments on commit 0fb8e62

Please sign in to comment.