Skip to content

Commit 601191b

Browse files
committed
updated download code
1 parent 7eacea4 commit 601191b

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

lib/browserstack/localbinary.rb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,12 @@ def download(dest_parent_dir)
4141
http.use_ssl = true
4242
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
4343

44-
http.request_get(uri.path) do |res|
45-
file = open(binary_path, 'w')
46-
res.read_body do |chunk|
47-
file.write(res.body)
48-
end
49-
file.close
50-
FileUtils.chmod 0755, binary_path
51-
end
44+
res = http.get(uri.path)
45+
file = open(binary_path, 'w')
46+
file.write(res.body)
47+
file.close
48+
FileUtils.chmod 0755, binary_path
49+
5250
binary_path
5351
end
5452

0 commit comments

Comments
 (0)