Skip to content

Commit

Permalink
Fix style issues
Browse files Browse the repository at this point in the history
While fixing `brew style` tap support, brew CI surfaced some style
issues in the test-bot tap. This fixes the style issues, so brew CI
will pass and the fix can be merged.
  • Loading branch information
samford committed Jun 12, 2024
1 parent 54ec4b4 commit cef60ab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion cmd/test-bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class TestBotCmd < AbstractCommand
description: "Print test step output in real time. Has the side effect of " \
"passing output as raw bytes instead of re-encoding in UTF-8."
switch "--test-default-formula",
description: "Use a default testing formula when not building a tap and no other formulae are specified."
description: "Use a default testing formula when not building " \
"a tap and no other formulae are specified."
flag "--root-url=",
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
flag "--git-name=",
Expand Down
1 change: 0 additions & 1 deletion lib/test_bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ module TestBot

HOMEBREW_TAP_REGEX = %r{^([\w-]+)/homebrew-([\w-]+)$}


def cleanup?(args)
args.cleanup? || ENV["GITHUB_ACTIONS"].present?
end
Expand Down
12 changes: 7 additions & 5 deletions lib/tests/formulae.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ def setup_formulae_deps_instances(formula, formula_name, args:)
installed = Utils.safe_popen_read("brew", "list", "--formula", "--full-name").split("\n")
dependencies =
Utils.safe_popen_read("brew", "deps", "--formula",
"--include-build",
"--include-test",
"--full-name",
formula_name)
"--include-build",
"--include-test",
"--full-name",
formula_name)
.split("\n")
installed_dependencies = installed & dependencies
installed_dependencies.each do |name|
Expand Down Expand Up @@ -588,7 +588,9 @@ def formula!(formula_name, args:)
ensure
cleanup_bottle_etc_var(formula) if cleanup?(args)

test "brew", "uninstall", "--formulae", "--force", *@unchanged_dependencies if @unchanged_dependencies.present?
if @unchanged_dependencies.present?
test "brew", "uninstall", "--formulae", "--force", *@unchanged_dependencies
end
end

def deleted_formula!(formula_name)
Expand Down

0 comments on commit cef60ab

Please sign in to comment.