dev-cmd/bottle: require arg for --root-url

This commit is contained in:
Steven Peters 2018-10-29 14:33:25 -07:00
parent 18bac4fa5d
commit 7116b74705
2 changed files with 6 additions and 1 deletions

View File

@ -106,7 +106,7 @@ module Homebrew
depends_on: "--write", depends_on: "--write",
description: "When passed with `--write`, a new commit will not generated after writing changes "\ description: "When passed with `--write`, a new commit will not generated after writing changes "\
"to the formula file." "to the formula file."
flag "--root-url", flag "--root-url=",
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default." description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
switch :verbose switch :verbose
switch :debug switch :debug

View File

@ -12,6 +12,11 @@ describe "brew bottle", :integration_test do
.and not_to_output.to_stdout .and not_to_output.to_stdout
.and be_a_failure .and be_a_failure
expect { brew "bottle", "--root-url" }
.to output(/missing argument: --root-url/).to_stderr
.and not_to_output.to_stdout
.and be_a_failure
setup_test_formula "testball" setup_test_formula "testball"
# `brew bottle` should not fail with dead symlink # `brew bottle` should not fail with dead symlink