Merge pull request #5028 from MikeMcQuaid/setup_remote_tap_symlink
setup_remote_tap: use system taps.
This commit is contained in:
commit
3cba4737a8
@ -1,7 +1,7 @@
|
|||||||
describe "brew cask", :integration_test, :needs_macos, :needs_network do
|
describe "brew cask", :integration_test, :needs_macos, :needs_network do
|
||||||
describe "list" do
|
describe "list" do
|
||||||
it "returns a list of installed Casks" do
|
it "returns a list of installed Casks" do
|
||||||
setup_remote_tap("homebrew/cask")
|
setup_remote_tap "homebrew/cask"
|
||||||
|
|
||||||
expect { brew "cask", "list" }.to be_a_success
|
expect { brew "cask", "list" }.to be_a_success
|
||||||
end
|
end
|
||||||
|
|||||||
@ -174,7 +174,16 @@ RSpec.shared_context "integration test" do
|
|||||||
|
|
||||||
def setup_remote_tap(name)
|
def setup_remote_tap(name)
|
||||||
Tap.fetch(name).tap do |tap|
|
Tap.fetch(name).tap do |tap|
|
||||||
tap.install(full_clone: false, quiet: true) unless tap.installed?
|
next if tap.installed?
|
||||||
|
full_name = Tap.fetch(name).full_name
|
||||||
|
# Check to see if the original Homebrew process has taps we can use.
|
||||||
|
system_tap_path = Pathname("#{ENV["HOMEBREW_LIBRARY"]}/Taps/#{full_name}")
|
||||||
|
if system_tap_path.exist?
|
||||||
|
system "git", "clone", "--shared", system_tap_path, tap.path
|
||||||
|
system "git", "-C", tap.path, "checkout", "master"
|
||||||
|
else
|
||||||
|
tap.install(full_clone: false, quiet: true)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user