exe/go-install in go-install-0.1.2 vs exe/go-install in go-install-0.1.3
- old
+ new
@@ -29,11 +29,11 @@
if Process.uid != 0
puts 'go-install requires privilege.'
exit 1
end
-versions = open('https://golang.org/dl/').read.scan(/go(\d+\.\d+\.\d+)/).flatten.uniq
+versions = URI.open('https://golang.org/dl/').read.scan(/go(\d+\.\d+\.\d+)/).flatten.uniq
latest = versions.first
if ARGV[0] == 'latest'
version = latest
elsif versions.include?(ARGV[0])
@@ -83,10 +83,10 @@
puts "Download from #{uri}"
puts cmd
open("|#{cmd}", 'r+') { |io|
- io.write open(uri).read
+ io.write URI.open(uri).read
}
puts <<EOM
go#{version} is installed in /usr/local/go .