mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
installer fix for docker images (#9656)
* Add extra IO.console.console_mode check to progress_bar Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add i686 workaround for curl during installs Signed-off-by: Satadru Pramanik <satadru@gmail.com> * bump version Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add system curl check Signed-off-by: Satadru Pramanik <satadru@gmail.com> * fix logic Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
3111067eb9
commit
57a68748b5
@@ -1,7 +1,7 @@
|
||||
# lib/const.rb
|
||||
# Defines common constants used in different parts of crew
|
||||
|
||||
CREW_VERSION = '1.47.0'
|
||||
CREW_VERSION = '1.47.1'
|
||||
|
||||
# kernel architecture
|
||||
KERN_ARCH = `uname -m`.chomp
|
||||
|
||||
@@ -162,7 +162,10 @@ def external_downloader(uri, filename = File.basename(url), verbose = false)
|
||||
# %<retry>: Will be substitute to #{CREW_DOWNLOADER_RETRY}
|
||||
# %<url>s: Will be substitute to #{url}
|
||||
# %<output>s: Will be substitute to #{filename}
|
||||
curl_cmdline = 'curl %<verbose>s -L -# --retry %<retry>s %<url>s -o %<output>s'
|
||||
# i686 curl throws a "SSL certificate problem: self signed certificate in certificate chain" error.
|
||||
# Only bypass this when we are using the system curl early in install.
|
||||
@default_curl = `which curl`.chomp
|
||||
curl_cmdline = ARCH == 'i686' && @default_curl == '/usr/bin/curl' ? 'curl %<verbose>s -kL -# --retry %<retry>s %<url>s -o %<output>s' : 'curl %<verbose>s -L -# --retry %<retry>s %<url>s -o %<output>s'
|
||||
|
||||
# use CREW_DOWNLOADER if specified, use curl by default
|
||||
downloader_cmdline = CREW_DOWNLOADER || curl_cmdline
|
||||
|
||||
@@ -28,7 +28,7 @@ class ProgressBar
|
||||
trap('WINCH') do
|
||||
# reset width settings after terminal resized
|
||||
# get terminal size, calculate the width of progress bar based on it
|
||||
@terminal_h, @terminal_w = IO.console&.winsize == [0, 0] ? [25, 80] : IO.console&.winsize
|
||||
@terminal_h, @terminal_w = !IO.console&.console_mode || IO.console&.winsize == [0, 0] ? [25, 80] : IO.console&.winsize
|
||||
@bar_width = @terminal_w -
|
||||
@info_before_bar.merge(@info_after_bar).values.sum - # space that all info blocks takes
|
||||
(@info_before_bar.merge(@info_after_bar).length * 2) # space for separator (whitespaces) between each info
|
||||
|
||||
Reference in New Issue
Block a user