Handle exceptions properly; fixes #13

This commit is contained in:
Thomas Barthelemy 2015-03-26 21:45:35 +00:00 committed by Alex Dergachev
parent c1101873f6
commit 08b64d80d9

View File

@ -165,8 +165,8 @@ class Repository::GitRemote < Repository::Git
ssh_known_hosts = ssh_dir + "/known_hosts" ssh_known_hosts = ssh_dir + "/known_hosts"
begin begin
FileUtils.mkdir_p ssh_dir FileUtils.mkdir_p ssh_dir
rescue e rescue Exception => e
raise "Unable to create directory #{ssh_dir}: " + "\n\n" + e.to_s raise "Unable to create directory #{ssh_dir}: " + e.to_s
end end
puts "Adding #{host} to #{ssh_known_hosts}" puts "Adding #{host} to #{ssh_known_hosts}"