mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
Handle filelist.nil? in convenience_functions during build.
Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
@@ -4,7 +4,7 @@ require 'etc'
|
||||
require 'open3'
|
||||
|
||||
OLD_CREW_VERSION ||= defined?(CREW_VERSION) ? CREW_VERSION : '1.0'
|
||||
CREW_VERSION ||= '1.65.2' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
||||
CREW_VERSION ||= '1.65.3' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
||||
|
||||
# Kernel architecture.
|
||||
KERN_ARCH ||= Etc.uname[:machine]
|
||||
|
||||
@@ -43,7 +43,7 @@ class ConvenienceFunctions
|
||||
def self.read_filelist(path)
|
||||
filelist = File.readlines(path, chomp: true)
|
||||
|
||||
if filelist.first.start_with?('# Total size')
|
||||
if !filelist.nil? && filelist.first.start_with?('# Total size')
|
||||
total_size, *contents = filelist
|
||||
return [total_size[/Total size: (\d+)/, 1].to_i, contents]
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user