Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
027cc685
Commit
027cc685
authored
5 years ago
by
emreerhan
Browse files
Options
Downloads
Patches
Plain Diff
Add condition to check if ruby version is < 2.7
parent
f8a4dd9f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/utils/ruby.sh
+10
-1
10 additions, 1 deletion
Library/Homebrew/utils/ruby.sh
with
10 additions
and
1 deletion
Library/Homebrew/utils/ruby.sh
+
10
−
1
View file @
027cc685
...
...
@@ -6,6 +6,7 @@ setup-ruby-path() {
# When bumping check if HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH (in brew.sh)
# also needs to be changed.
local
minimum_ruby_version
=
"2.6.3"
local
maximum_ruby_version
=
"2.7.0"
vendor_dir
=
"
$HOMEBREW_LIBRARY
/Homebrew/vendor"
vendor_ruby_current_version
=
"
$vendor_dir
/portable-ruby/current"
...
...
@@ -45,7 +46,15 @@ setup-ruby-path() {
ruby_version_new_enough
=
"
$(
"
$HOMEBREW_RUBY_PATH
"
--enable-frozen-string-literal
--disable
=
gems,did_you_mean,rubyopt
-rrubygems
-e
"puts Gem::Version.new(RUBY_VERSION.to_s.dup) >= Gem::Version.new('
$minimum_ruby_version
')"
)
"
fi
if
[[
-z
"
$HOMEBREW_RUBY_PATH
"
||
-n
"
$HOMEBREW_FORCE_VENDOR_RUBY
"
||
"
$ruby_version_new_enough
"
!=
"true"
]]
if
[[
-n
"
$HOMEBREW_MACOS_SYSTEM_RUBY_OLD_ENOUGH
"
]]
then
ruby_version_old_enough
=
"true"
elif
[[
-n
"
$HOMEBREW_RUBY_PATH
"
&&
-z
"
$HOMEBREW_FORCE_VENDOR_RUBY
"
]]
then
ruby_version_old_enough
=
"
$(
"
$HOMEBREW_RUBY_PATH
"
--enable-frozen-string-literal
--disable
=
gems,did_you_mean,rubyopt
-rrubygems
-e
"puts Gem::Version.new(RUBY_VERSION.to_s.dup) < Gem::Version.new('
$maximum_ruby_version
')"
)
"
fi
if
[[
-z
"
$HOMEBREW_RUBY_PATH
"
||
-n
"
$HOMEBREW_FORCE_VENDOR_RUBY
"
||
"
$ruby_version_new_enough
"
!=
"true"
||
"
$ruby_version_old_enough
"
!=
"true"
]]
then
brew vendor-install ruby
if
[[
!
-x
"
$vendor_ruby_path
"
]]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment