dev-cmd: enable frozen string literals
Now that we use Ruby 2.6 we can fix these last two files.
This commit is contained in:
parent
5da322d6be
commit
81db0e9551
@ -1,6 +1,4 @@
|
|||||||
# Uses ERB so can't use Frozen String Literals until >=Ruby 2.4:
|
# frozen_string_literal: true
|
||||||
# https://bugs.ruby-lang.org/issues/12031
|
|
||||||
# frozen_string_literal: false
|
|
||||||
|
|
||||||
require "formula"
|
require "formula"
|
||||||
require "utils/bottles"
|
require "utils/bottles"
|
||||||
@ -11,7 +9,7 @@ require "cli/parser"
|
|||||||
require "utils/inreplace"
|
require "utils/inreplace"
|
||||||
require "erb"
|
require "erb"
|
||||||
|
|
||||||
BOTTLE_ERB = <<-EOS.freeze
|
BOTTLE_ERB = <<-EOS
|
||||||
bottle do
|
bottle do
|
||||||
<% if !root_url.start_with?(HOMEBREW_BOTTLE_DEFAULT_DOMAIN) %>
|
<% if !root_url.start_with?(HOMEBREW_BOTTLE_DEFAULT_DOMAIN) %>
|
||||||
root_url "<%= root_url %>"
|
root_url "<%= root_url %>"
|
||||||
@ -43,7 +41,7 @@ module Homebrew
|
|||||||
|
|
||||||
def bottle_args
|
def bottle_args
|
||||||
Homebrew::CLI::Parser.new do
|
Homebrew::CLI::Parser.new do
|
||||||
usage_banner <<~EOS.freeze
|
usage_banner <<~EOS
|
||||||
`bottle` [<options>] <formula>
|
`bottle` [<options>] <formula>
|
||||||
|
|
||||||
Generate a bottle (binary package) from a formula that was installed with
|
Generate a bottle (binary package) from a formula that was installed with
|
||||||
@ -382,7 +380,7 @@ module Homebrew
|
|||||||
"#{key}: old: #{old_value}, new: #{value}"
|
"#{key}: old: #{old_value}, new: #{value}"
|
||||||
end
|
end
|
||||||
|
|
||||||
odie <<~EOS.freeze
|
odie <<~EOS
|
||||||
--keep-old was passed but there are changes in:
|
--keep-old was passed but there are changes in:
|
||||||
#{mismatches.join("\n")}
|
#{mismatches.join("\n")}
|
||||||
EOS
|
EOS
|
||||||
@ -493,7 +491,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
unless mismatches.empty?
|
unless mismatches.empty?
|
||||||
odie <<~EOS.freeze
|
odie <<~EOS
|
||||||
--keep-old was passed but there are changes in:
|
--keep-old was passed but there are changes in:
|
||||||
#{mismatches.join("\n")}
|
#{mismatches.join("\n")}
|
||||||
EOS
|
EOS
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
# Uses ERB so can't use Frozen String Literals until >=Ruby 2.4:
|
# frozen_string_literal: true
|
||||||
# https://bugs.ruby-lang.org/issues/12031
|
|
||||||
# frozen_string_literal: false
|
|
||||||
|
|
||||||
require "formula"
|
require "formula"
|
||||||
require "erb"
|
require "erb"
|
||||||
@ -18,7 +16,7 @@ module Homebrew
|
|||||||
|
|
||||||
def man_args
|
def man_args
|
||||||
Homebrew::CLI::Parser.new do
|
Homebrew::CLI::Parser.new do
|
||||||
usage_banner <<~EOS.freeze
|
usage_banner <<~EOS
|
||||||
`man` [<options>]
|
`man` [<options>]
|
||||||
|
|
||||||
Generate Homebrew's manpages.
|
Generate Homebrew's manpages.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user