Skip to content

Commit

Permalink
Merge pull request #1394 from Homebrew/uninstall-bash-after-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocab authored Feb 8, 2025
2 parents 51ee1df + 862dcc8 commit 8e75a30
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/tests/formulae.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ def run!(args:)

return unless ENV["GITHUB_ACTIONS"]

# Remove `bash` after it is tested, since leaving a broken `bash`
# installation in the environment can cause issues with subsequent
# GitHub Actions steps.
test "brew", "uninstall", "--formula", "--force", "bash" if @testing_formulae.include?("bash")

File.open(ENV.fetch("GITHUB_OUTPUT"), "a") do |f|
f.puts "skipped_or_failed_formulae=#{@skipped_or_failed_formulae.join(",")}"
end
Expand Down
9 changes: 9 additions & 0 deletions lib/tests/formulae_dependents.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ def run!(args:)
dependent_formulae!(formula_name, args:)
puts
end

return unless ENV["GITHUB_ACTIONS"]

# Remove `bash` after it is tested, since leaving a broken `bash`
# installation in the environment can cause issues with subsequent
# GitHub Actions steps.
return unless @dependent_testing_formulae.include?("bash")

test "brew", "uninstall", "--formula", "--force", "bash"
end

private
Expand Down

0 comments on commit 8e75a30

Please sign in to comment.