lib/chap/runner.rb in chap-0.0.1 vs lib/chap/runner.rb in chap-0.0.2
- old
+ new
@@ -56,10 +56,10 @@
# make sure the directory exist for symlink creation
dirname = File.dirname(dest)
FileUtils.mkdir_p(dirname) unless File.exist?(dirname)
if File.symlink?(dest)
File.delete(dest)
- elsif File.directory?(dest)
+ elsif File.exist?(dest)
FileUtils.rm_rf(dest)
end
FileUtils.ln_s(src,dest)
end
end
\ No newline at end of file