Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/bundle: add brew bundle edit command. #1577

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmd/bundle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ class BundleCmd < AbstractCommand

By default, only Homebrew formula dependencies are listed.

`brew bundle edit`:
Edit the `Brewfile` in your editor.

`brew bundle exec` <command>:
Run an external command in an isolated build environment based on the `Brewfile` dependencies.

Expand Down Expand Up @@ -123,7 +126,7 @@ class BundleCmd < AbstractCommand
conflicts "--all", "--no-vscode"
conflicts "--vscode", "--no-vscode"

named_args %w[install dump cleanup check exec list sh env]
named_args %w[install dump cleanup check exec list sh env edit]
end

sig { override.void }
Expand Down Expand Up @@ -191,6 +194,8 @@ def run
whalebrew: args.whalebrew? || no_type_args,
vscode:
)
when "edit"
exec_editor(Bundle::Brewfile.path(global:, file:))
when "cleanup"
Bundle::Commands::Cleanup.run(global:, file:, force:, zap:)
when "check"
Expand Down
Loading