Skip to content

Commit 08b64d8

Browse files
Thomas Barthelemydergachev
authored andcommitted
Handle exceptions properly; fixes dergachev#13
1 parent c110187 commit 08b64d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/models/repository/git_remote.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ def self.add_known_host(host)
165165
ssh_known_hosts = ssh_dir + "/known_hosts"
166166
begin
167167
FileUtils.mkdir_p ssh_dir
168-
rescue e
169-
raise "Unable to create directory #{ssh_dir}: " + "\n\n" + e.to_s
168+
rescue Exception => e
169+
raise "Unable to create directory #{ssh_dir}: " + e.to_s
170170
end
171171

172172
puts "Adding #{host} to #{ssh_known_hosts}"

0 commit comments

Comments
 (0)