Browse files

Fix idempotence of symlink creation in Rakefile spec_prep task

The presence of a symlink was being tested with File.exists?, but this was not
reliable in my own testing.  I changed it to File.symlink?, which I hope
reflects the intent.
  • Loading branch information...
1 parent 1da9582 commit 39522bf952c8323b39c8c8d219120b2aa5a5f348 @L2G L2G committed Feb 16, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 Rakefile
2 Rakefile
@@ -58,7 +58,7 @@ task :spec_prep do
fixtures("symlinks").each do |source, target|
- File::exists?(target) || FileUtils::ln_s(source, target)
+ FileUtils.ln_s(source, target) unless File.symlink?(target)
FileUtils::mkdir_p("tests/data") unless File.exists? "tests/data"

0 comments on commit 39522bf

Please sign in to comment.