Merge pull request #9112 from samford/livecheck-skip-disabled-formulae
livecheck: skip disabled formulae
This commit is contained in:
commit
c5fea1b719
@ -233,6 +233,13 @@ module Homebrew
|
||||
return
|
||||
end
|
||||
|
||||
if formula.disabled? && !formula.livecheckable?
|
||||
return status_hash(formula, "disabled", args: args) if args.json?
|
||||
|
||||
puts "#{Tty.red}#{formula_name(formula, args: args)}#{Tty.reset} : disabled" unless args.quiet?
|
||||
return
|
||||
end
|
||||
|
||||
if formula.versioned_formula? && !formula.livecheckable?
|
||||
return status_hash(formula, "versioned", args: args) if args.json?
|
||||
|
||||
|
@ -29,6 +29,15 @@ describe Homebrew::Livecheck do
|
||||
end
|
||||
end
|
||||
|
||||
let(:f_disabled) do
|
||||
formula("test_disabled") do
|
||||
desc "Disabled test formula"
|
||||
homepage "https://brew.sh"
|
||||
url "https://brew.sh/test-0.0.1.tgz"
|
||||
disable! because: :unmaintained
|
||||
end
|
||||
end
|
||||
|
||||
let(:f_gist) do
|
||||
formula("test_gist") do
|
||||
desc "Gist test formula"
|
||||
@ -100,6 +109,12 @@ describe Homebrew::Livecheck do
|
||||
.and not_to_output.to_stderr
|
||||
end
|
||||
|
||||
it "skips a disabled formula without a livecheckable" do
|
||||
expect { livecheck.skip_conditions(f_disabled, args: args) }
|
||||
.to output("test_disabled : disabled\n").to_stdout
|
||||
.and not_to_output.to_stderr
|
||||
end
|
||||
|
||||
it "skips a versioned formula without a livecheckable" do
|
||||
expect { livecheck.skip_conditions(f_versioned, args: args) }
|
||||
.to output("test@0.0.1 : versioned\n").to_stdout
|
||||
|
Loading…
x
Reference in New Issue
Block a user