19 Commits

Author SHA1 Message Date
Issy Long
ce8bf906c1
Retain the old brew bundle --brews flag for compatibility
https://github.com/Homebrew/brew/pull/20209#discussion_r2186099917
2025-07-04 22:02:59 +01:00
Issy Long
990c1efc16
bundle: Rename "brews" to "formulae" for consistency
- Homebrew Bundle referred to formulae as "brews". But it referred to
  casks as "casks" and taps as "taps".
- Let's use the same terminology everywhere.
- (I know that `brew "hello"` is the formula syntax in the Brewfile, so
  I'm not changing that (though would be up for it, in a backwards
  compatible manner), just making the code more consistent.)
2025-07-04 21:08:37 +01:00
Mike McQuaid
5fe43ed3f2
brew (bundle|) sh: use user's configuration but override prompts.
This was more painful that I expected but will allow `brew bundle sh`
and `brew sh` to use the user's configuration but use our custom prompt
for Bash and ZSH.
2025-06-05 15:43:34 +01:00
Eric Knibbe
3dc9e88542
parser: show related env var in switch description 2025-06-03 13:57:42 -04:00
Bo Anderson
418a771d12
bundle: add support for selective cleanup 2025-05-23 06:19:01 +01:00
thibhero
d19de85896 Setting HOMEBREW_ASK to nil in case it was set before 2025-04-30 23:50:07 -04:00
Mike McQuaid
0d86de5416
cmd/bundle: fix no_upgrade type.
If you set `HOMEBREW_BUNDLE_NO_UPGRADE=1`, `brew bundle check` will
output:

```
Error: Parameter 'no_upgrade': Expected type T::Boolean, got type String with value "1"
Caller: /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.4.0/gems/sorbet-runtime-0.5.12039/lib/types/private/methods/call_validation.rb:227
Definition: /opt/homebrew/Library/Homebrew/bundle/commands/check.rb:14 (Homebrew::Bundle::Commands::Check.run)
```
2025-04-28 12:13:53 +01:00
Carlo Cabrera
08d5ca0d01
brew style --fix 2025-04-24 16:34:36 +08:00
Carlo Cabrera
f3c25498f8
bundle/commands/exec: check that Brewfile is installed with --check
`brew bundle exec` behaves correctly only after doing `brew bundle install`.

Running `brew bundle check` can be slow, so let's add a `--check` flag
to `brew bundle exec` which will also run `brew bundle check` before
`brew bundle exec` to ensure that the `Brewfile` has been installed
before proceeding.
2025-04-24 16:34:23 +08:00
Mike McQuaid
60c047b5ea
Add HOMEBREW_BUNDLE_SERVICES variable to brew bundle
This allows another way to pass `--services` to `brew bundle`.
2025-04-23 17:20:14 +01:00
Mike McQuaid
89d0309b9c
Add brew bundle --upgrade-formulae
This flag allows you to specify formulae to upgrade, even if
`$HOMEBREW_BUNDLE_NO_UPGRADE` is set.

This is useful for upgrading specific formulae without upgrading all
formulae.

While we're here, let's add Sorbet signatures to the `Bundle` module
because I needed to add a new method there anyway.
2025-04-02 17:15:36 +01:00
Bo Anderson
650f62bcba
Fold brew bundle services into exec 2025-03-28 05:54:58 +00:00
Bo Anderson
c7e8b66da3
bundle: add --services flag for sh and exec 2025-03-28 05:54:57 +00:00
Bo Anderson
615fb764a1
Add brew bundle services helper 2025-03-28 05:21:07 +00:00
Mike McQuaid
1ce12ae6e5
Merge pull request #19575 from Homebrew/brew_bundle_filtering
Don't filter the environment for `brew bundle (exec|env|sh)`
2025-03-25 09:07:39 +00:00
Carlo Cabrera
f7ee1902e4
bundle: require more lazily
This will hopefully make using `brew bundle` a little bit snappier.
2025-03-24 22:48:58 +08:00
Mike McQuaid
6e20cedb67
Don't filter the environment for brew bundle (exec|env|sh)
It's both unexpected and undesirable for `brew bundle (exec|env|sh)` to
filter the environment and makes these tools less useful.

Not filtering the environment, though, causes issues with the
`brew bundle sh` shell. Fix this up and, while we're here, also improve
the formatting for both `zsh` and `bash` (the default) to use nicer and
more consistent prompts and colours.

To simplify this, consolidate some logic in a new
`Utils::Shell.shell_with_prompt` method and add tests for it and a
similar notice for `brew bundle sh`.

Finally, avoid printing out the notice when `HOMEBREW_NO_ENV_HINTS` is
set.
2025-03-24 13:37:25 +00:00
Mike McQuaid
d84fac5af4
Look for VSCode variants
We've had requests for this in Homebrew/bundle a few times so let's
implement it both for there and for `brew edit`.

Tested on my machine with `cursor` and working as expected.
2025-03-19 11:42:37 +00:00
Mike McQuaid
bdeca530ff
Migrate Homebrew/bundle to Homebrew/brew
Co-authored-by: Bo Anderson <mail@boanderson.me>
2025-03-19 06:47:01 +00:00