lib/beaker/host/windows/pkg.rb in beaker-2.30.1 vs lib/beaker/host/windows/pkg.rb in beaker-2.31.0
- old
+ new
@@ -24,10 +24,16 @@
rootdir = "c:\\\\cygwin"
cygwin = "setup-x86.exe"
end
if not check_for_command(cygwin)
- execute("curl --retry 5 http://cygwin.com/#{cygwin} -o /cygdrive/c/Windows/System32/#{cygwin}")
+ command = "curl --retry 5 https://cygwin.com/#{cygwin} -o /cygdrive/c/Windows/System32/#{cygwin}"
+ begin
+ execute(command)
+ rescue Beaker::Host::CommandFailure
+ command.sub!('https', 'http')
+ execute(command)
+ end
end
execute("#{cygwin} -q -n -N -d -R #{cmdline_args} #{rootdir} -s http://cygwin.osuosl.org -P #{name}")
end
def uninstall_package(name, cmdline_args = '')