tap: support --quieter flag
Closes Homebrew/homebrew#49551. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
43c6061bc9
commit
eb6f970b90
@ -16,8 +16,9 @@ module Homebrew
|
|||||||
else
|
else
|
||||||
tap = Tap.fetch(ARGV.named[0])
|
tap = Tap.fetch(ARGV.named[0])
|
||||||
begin
|
begin
|
||||||
tap.install(:clone_target => ARGV.named[1],
|
tap.install :clone_target => ARGV.named[1],
|
||||||
:full_clone => ARGV.include?("--full"))
|
:full_clone => ARGV.include?("--full"),
|
||||||
|
:quiet => ARGV.quieter?
|
||||||
rescue TapAlreadyTappedError => e
|
rescue TapAlreadyTappedError => e
|
||||||
opoo e
|
opoo e
|
||||||
end
|
end
|
||||||
|
|||||||
@ -205,6 +205,7 @@ class IntegrationCommandTests < Homebrew::TestCase
|
|||||||
shutup do
|
shutup do
|
||||||
system "git", "init"
|
system "git", "init"
|
||||||
system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew-foo"
|
system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew-foo"
|
||||||
|
FileUtils.touch "readme"
|
||||||
system "git", "add", "--all"
|
system "git", "add", "--all"
|
||||||
system "git", "commit", "-m", "init"
|
system "git", "commit", "-m", "init"
|
||||||
end
|
end
|
||||||
@ -220,6 +221,8 @@ class IntegrationCommandTests < Homebrew::TestCase
|
|||||||
assert_match "Unpinned homebrew/foo", cmd("tap-unpin", "homebrew/foo")
|
assert_match "Unpinned homebrew/foo", cmd("tap-unpin", "homebrew/foo")
|
||||||
assert_match "Tapped", cmd("tap", "homebrew/bar", path/".git")
|
assert_match "Tapped", cmd("tap", "homebrew/bar", path/".git")
|
||||||
assert_match "Untapped", cmd("untap", "homebrew/bar")
|
assert_match "Untapped", cmd("untap", "homebrew/bar")
|
||||||
|
assert_equal "", cmd("tap", "homebrew/bar", path/".git", "-q", "--full")
|
||||||
|
assert_match "Untapped", cmd("untap", "homebrew/bar")
|
||||||
ensure
|
ensure
|
||||||
Tap::TAP_DIRECTORY.rmtree
|
Tap::TAP_DIRECTORY.rmtree
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user