Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

If checkout fails, remove it and raise an exception

  • Loading branch information...
commit c4916feb8df04db8ef9f93247a224af5d12700c4 1 parent 858a51e
@jeremy jeremy authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 recipes/cached_externals.rb
View
7 recipes/cached_externals.rb
@@ -35,7 +35,12 @@
shared = File.expand_path(File.join("../shared/externals", path))
FileUtils.mkdir_p(shared)
destination = File.join(shared, revision)
- system(scm.checkout(revision, destination)) if !File.exists?(destination)
+ if !File.exists?(destination)
+ unless system(scm.checkout(revision, destination))
+ FileUtils.rm_rf(destination) if File.exists?(destination)
+ raise "Error checking out #{revision} to #{destination}"
+ end
+ end
FileUtils.ln_s(destination, path)
else
shared = File.join(shared_path, "externals", path)
Please sign in to comment.
Something went wrong with that request. Please try again.