Skip to content

Commit fe179cf

Browse files
committed
cmd/tab: sync installed_as_dependency when changing installed_on_request
When marking a formula as not installed on request, also set installed_as_dependency to true, to ensure brew bundle dump correctly excludes it. Previously, brew tab --no-installed-on-request had no effect on bundle dump because the dump logic checks both Fixes #21751
1 parent c00096c commit fe179cf

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Library/Homebrew/cmd/tab.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def update_tab(formula_or_cask, installed_on_request:)
7878
end
7979

8080
tab.installed_on_request = installed_on_request
81+
tab.installed_as_dependency = !installed_on_request if formula_or_cask.is_a?(Formula)
8182
tab.write
8283
ohai "#{name} is now marked as #{installed_on_request_str}."
8384
end

0 commit comments

Comments
 (0)