mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: correctly force Ruby version 2.5.2 and up
This commit is contained in:
parent
bc7c1e411c
commit
173408d72f
@ -1,13 +1,15 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# note, we require 2.5.2 and up cause 2.5.1 had some mail bugs we no longer
|
||||||
|
# monkey patch, so this avoids people booting with this problem version
|
||||||
begin
|
begin
|
||||||
if !RUBY_VERSION.match?(/^2\.[456]/)
|
if !RUBY_VERSION.match?(/^2\.(([67])|(5\.[2-9]))/)
|
||||||
STDERR.puts "Discourse requires Ruby 2.4.0 or up"
|
STDERR.puts "Discourse requires Ruby 2.5.2 or up"
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
rescue
|
rescue
|
||||||
# no String#match?
|
# no String#match?
|
||||||
STDERR.puts "Discourse requires Ruby 2.4.0 or up"
|
STDERR.puts "Discourse requires Ruby 2.5.2 or up"
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user