lib/repositories.rb in forj-0.0.9 vs lib/repositories.rb in forj-0.0.10
- old
+ new
@@ -26,11 +26,16 @@
maestro_url = definitions['default']['maestro']
home = File.expand_path('~')
path = home + '/.hpcloud/'
- unless File.directory?(path) do
- g = Git.clone(maestro_url, 'maestro', :path => path)
+ begin
+ unless File.directory?(path) do
+ Git.clone(maestro_url, 'maestro', :path => path)
+ end
end
+ rescue
+ puts 'Error while cloning the repo from %s' % [maestro_url]
+ puts 'If this error persist you could clone the repo manually in ~/.hpcloud/'
end
end
end
\ No newline at end of file