Skip to content

Commit

Permalink
Merge pull request #28 from hunner/fail_to_clone
Browse files Browse the repository at this point in the history
Rake should fail if git can't clone repository
  • Loading branch information
Branan Purvine-Riley committed Dec 14, 2012
2 parents fe7e778 + 04f6053 commit 64a30af
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 64a30af

Please sign in to comment.