lib/poolparty/plugins/git.rb in auser-poolparty-0.2.16 vs lib/poolparty/plugins/git.rb in auser-poolparty-0.2.20

- old
+ new

@@ -6,19 +6,19 @@ def loaded(opts={}, parent=self) has_git_repos end def has_git_repos - exec({:name => "git-#{name}"}) do + has_package(:name => "git-core") + exec({:name => "git-#{name}", :requires => package(:name => "git-core")}) do command parent.user ? "git clone #{parent.user}@#{parent.source} #{parent.path}" : "git clone #{parent.source} #{parent.to ? parent.to : ""}" cwd "#{parent.cwd if parent.cwd}" creates "#{::File.join( (parent.cwd ? parent.cwd : cwd), ::File.basename(parent.source, ::File.extname(parent.source)) )}/.git" - + exec(:name => "update-#{name}") do cwd ::File.dirname(parent.creates) command "git pull" end - end end # Since git is not a native type, we have to say which core resource # it is using to be able to require it \ No newline at end of file