mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-07 22:54:11 -05:00
Fix undefined method 'gsub' for nil (NoMethodError) in ConvenienceFunctions.libtoolize (#13700)
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.68.4' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
||||
CREW_VERSION = '1.68.5' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
|
||||
|
||||
# Kernel architecture.
|
||||
KERN_ARCH = Etc.uname[:machine]
|
||||
|
||||
@@ -97,8 +97,8 @@ class ConvenienceFunctions
|
||||
s.gsub!("#{CREW_LIB_PREFIX}/", '')
|
||||
end
|
||||
return if libnames.empty?
|
||||
dlname = libnames.grep(/.so./).first
|
||||
libname = dlname.gsub(/.so.\d+/, '')
|
||||
dlname = libnames.grep(/.so(.)?/).first
|
||||
libname = dlname.gsub(/.so(.\d+)?/, '')
|
||||
longest_libname = libnames.max_by(&:length)
|
||||
libvars = longest_libname.rpartition('.so.')[2].split('.')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user