mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Remove unused --force-auto-update option
Remove the `brew tap --force-auto-update` option and the `force_auto_update` configuration file option from Homebrew Bundles. Fixes #19856
This commit is contained in:
parent
a63baa62d2
commit
770335f72e
@ -19,7 +19,6 @@ module Homebrew
|
|||||||
puts "Installing #{name} tap. It is not currently installed." if verbose
|
puts "Installing #{name} tap. It is not currently installed." if verbose
|
||||||
args = []
|
args = []
|
||||||
args << "--force" if force
|
args << "--force" if force
|
||||||
args.append("--force-auto-update") if options[:force_auto_update]
|
|
||||||
|
|
||||||
success = if options[:clone_target]
|
success = if options[:clone_target]
|
||||||
Bundle.brew("tap", name, options[:clone_target], *args, verbose:)
|
Bundle.brew("tap", name, options[:clone_target], *args, verbose:)
|
||||||
|
@ -33,8 +33,6 @@ module Homebrew
|
|||||||
"integration.",
|
"integration.",
|
||||||
replacement: false,
|
replacement: false,
|
||||||
disable: true
|
disable: true
|
||||||
switch "--[no-]force-auto-update",
|
|
||||||
hidden: true
|
|
||||||
switch "--custom-remote",
|
switch "--custom-remote",
|
||||||
description: "Install or change a tap with a custom remote. Useful for mirrors."
|
description: "Install or change a tap with a custom remote. Useful for mirrors."
|
||||||
switch "--repair",
|
switch "--repair",
|
||||||
|
@ -23,9 +23,6 @@ class Homebrew::Cmd::TapCmd::Args < Homebrew::CLI::Args
|
|||||||
sig { returns(T::Boolean) }
|
sig { returns(T::Boolean) }
|
||||||
def force?; end
|
def force?; end
|
||||||
|
|
||||||
sig { returns(T::Boolean) }
|
|
||||||
def force_auto_update?; end
|
|
||||||
|
|
||||||
sig { returns(T::Boolean) }
|
sig { returns(T::Boolean) }
|
||||||
def repair?; end
|
def repair?; end
|
||||||
end
|
end
|
||||||
|
@ -15,7 +15,7 @@ RSpec.describe Homebrew::Bundle::Dsl do
|
|||||||
cask_args appdir: '/Applications'
|
cask_args appdir: '/Applications'
|
||||||
tap 'homebrew/cask'
|
tap 'homebrew/cask'
|
||||||
tap 'telemachus/brew', 'https://telemachus@bitbucket.org/telemachus/brew.git'
|
tap 'telemachus/brew', 'https://telemachus@bitbucket.org/telemachus/brew.git'
|
||||||
tap 'auto/update', 'https://bitbucket.org/auto/update.git', force_auto_update: true
|
tap 'auto/update', 'https://bitbucket.org/auto/update.git'
|
||||||
brew 'imagemagick'
|
brew 'imagemagick'
|
||||||
brew 'mysql@5.6', restart_service: true, link: true, conflicts_with: ['mysql']
|
brew 'mysql@5.6', restart_service: true, link: true, conflicts_with: ['mysql']
|
||||||
brew 'emacs', args: ['with-cocoa', 'with-gnutls'], link: :overwrite
|
brew 'emacs', args: ['with-cocoa', 'with-gnutls'], link: :overwrite
|
||||||
@ -40,10 +40,7 @@ RSpec.describe Homebrew::Bundle::Dsl do
|
|||||||
expect(dsl.entries[0].name).to eql("homebrew/cask")
|
expect(dsl.entries[0].name).to eql("homebrew/cask")
|
||||||
expect(dsl.entries[1].name).to eql("telemachus/brew")
|
expect(dsl.entries[1].name).to eql("telemachus/brew")
|
||||||
expect(dsl.entries[1].options).to eql(clone_target: "https://telemachus@bitbucket.org/telemachus/brew.git")
|
expect(dsl.entries[1].options).to eql(clone_target: "https://telemachus@bitbucket.org/telemachus/brew.git")
|
||||||
expect(dsl.entries[2].options).to eql(
|
expect(dsl.entries[2].options).to eql(clone_target: "https://bitbucket.org/auto/update.git")
|
||||||
clone_target: "https://bitbucket.org/auto/update.git",
|
|
||||||
force_auto_update: true,
|
|
||||||
)
|
|
||||||
expect(dsl.entries[3].name).to eql("imagemagick")
|
expect(dsl.entries[3].name).to eql("imagemagick")
|
||||||
expect(dsl.entries[4].name).to eql("mysql@5.6")
|
expect(dsl.entries[4].name).to eql("mysql@5.6")
|
||||||
expect(dsl.entries[4].options).to eql(restart_service: true, link: true, conflicts_with: ["mysql"])
|
expect(dsl.entries[4].options).to eql(restart_service: true, link: true, conflicts_with: ["mysql"])
|
||||||
|
@ -55,25 +55,5 @@ RSpec.describe Homebrew::Bundle::TapInstaller do
|
|||||||
expect(described_class.install("homebrew/cask", clone_target: "clone_target_path")).to be(false)
|
expect(described_class.install("homebrew/cask", clone_target: "clone_target_path")).to be(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "with force_auto_update" do
|
|
||||||
it "taps" do
|
|
||||||
expect(Homebrew::Bundle).to receive(:system).with(HOMEBREW_BREW_FILE, "tap", "homebrew/cask",
|
|
||||||
"--force-auto-update",
|
|
||||||
verbose: false)
|
|
||||||
.and_return(true)
|
|
||||||
expect(described_class.preinstall("homebrew/cask", force_auto_update: true)).to be(true)
|
|
||||||
expect(described_class.install("homebrew/cask", force_auto_update: true)).to be(true)
|
|
||||||
end
|
|
||||||
|
|
||||||
it "fails" do
|
|
||||||
expect(Homebrew::Bundle).to receive(:system).with(HOMEBREW_BREW_FILE, "tap", "homebrew/cask",
|
|
||||||
"--force-auto-update",
|
|
||||||
verbose: false)
|
|
||||||
.and_return(false)
|
|
||||||
expect(described_class.preinstall("homebrew/cask", force_auto_update: true)).to be(true)
|
|
||||||
expect(described_class.install("homebrew/cask", force_auto_update: true)).to be(false)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -9,7 +9,7 @@ RSpec.describe Homebrew::Cmd::TapCmd do
|
|||||||
it "taps a given Tap", :integration_test do
|
it "taps a given Tap", :integration_test do
|
||||||
path = setup_test_tap
|
path = setup_test_tap
|
||||||
|
|
||||||
expect { brew "tap", "--force-auto-update", "homebrew/bar", path/".git" }
|
expect { brew "tap", "homebrew/bar", path/".git" }
|
||||||
.to output(/Tapped/).to_stderr
|
.to output(/Tapped/).to_stderr
|
||||||
.and be_a_success
|
.and be_a_success
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user