Skip to content

Commit

Permalink
Rake should fail if git can't clone repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Sanchez authored and hunner committed Dec 14, 2012
1 parent fe7e778 commit 04f6053
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/puppetlabs_spec_helper/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def fixtures(category)
ref = opts["ref"]
end

File::exists?(target) || system("git clone #{remote} #{target}")
unless File::exists?(target) || system("git clone #{remote} #{target}")
fail "Failed to clone #{remote} into #{target}"
end
system("cd #{target}; git reset --hard #{ref}") if ref
end

Expand Down

0 comments on commit 04f6053

Please sign in to comment.