We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c969e88 commit 7eacea4Copy full SHA for 7eacea4
lib/browserstack/localbinary.rb
@@ -1,4 +1,5 @@
1
require 'net/http'
2
+require 'net/https'
3
require 'rbconfig'
4
require 'openssl'
5
require 'tmpdir'
@@ -39,13 +40,14 @@ def download(dest_parent_dir)
39
40
http = Net::HTTP.new(uri.host, uri.port)
41
http.use_ssl = true
42
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
43
+
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
- FileUtils.chmod "+x", binary_path
50
+ FileUtils.chmod 0755, binary_path
51
52
binary_path
53
0 commit comments