You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: Library/Homebrew/cmd/bundle.rb
+13-4
Original file line number
Diff line number
Diff line change
@@ -51,15 +51,15 @@ class Bundle < AbstractCommand
51
51
`brew bundle remove` <name> [...]:
52
52
Remove entries that match `name` from your `Brewfile`. Use `--formula`, `--cask`, `--tap`, `--mas`, `--whalebrew` or `--vscode` to remove only entries of the corresponding type. Passing `--formula` also removes matches against formula aliases and old formula names.
53
53
54
-
`brew bundle exec` <command>:
54
+
`brew bundle exec` [--check] <command>:
55
55
Run an external command in an isolated build environment based on the `Brewfile` dependencies.
56
56
57
57
This sanitized build environment ignores unrequested dependencies, which makes sure that things you didn't specify in your `Brewfile` won't get picked up by commands like `bundle install`, `npm install`, etc. It will also add compiler flags which will help with finding keg-only dependencies like `openssl`, `icu4c`, etc.
58
58
59
-
`brew bundle sh`:
59
+
`brew bundle sh` [--check]:
60
60
Run your shell in a `brew bundle exec` environment.
61
61
62
-
`brew bundle env`:
62
+
`brew bundle env` [--check]:
63
63
Print the environment variables that would be set in a `brew bundle exec` environment.
64
64
EOS
65
65
flag"--file=",
@@ -119,6 +119,9 @@ class Bundle < AbstractCommand
119
119
description: "`dump` does not add `restart_service` to formula lines."
120
120
switch"--zap",
121
121
description: "`cleanup` casks using the `zap` command instead of `uninstall`."
122
+
switch"--check",
123
+
description: "Check that all dependencies in the Brewfile are installed before " \
124
+
"running `exec`, `sh`, or `env`."
122
125
123
126
conflicts"--all","--no-vscode"
124
127
conflicts"--vscode","--no-vscode"
@@ -127,6 +130,8 @@ class Bundle < AbstractCommand
0 commit comments