Skip to content

Commit

Permalink
bundle: add --upgrade switch.
Browse files Browse the repository at this point in the history
This allows overriding the `HOMEBREW_BUNDLE_NO_UPGRADE` environment
variable. The environment variable wasn't really documented specifically
before so let's do that here, too.
  • Loading branch information
MikeMcQuaid committed Jan 23, 2025
1 parent f5acb38 commit 9eade55
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/bundle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ class BundleCmd < AbstractCommand
env: :bundle_no_upgrade,
description: "`install` does not run `brew upgrade` on outdated dependencies. " \
"`check` does not check for outdated dependencies. " \
"Note they may still be upgraded by `brew install` if needed."
"Note they may still be upgraded by `brew install` if needed." \
"This is enabled by default if `HOMEBREW_BUNDLE_NO_UPGRADE` is set."
switch "--upgrade",
description: "`install` runs `brew upgrade` on outdated dependencies, " \
"even if `HOMEBREW_BUNDLE_NO_UPGRADE` is set. "
switch "-f", "--force",
description: "`install` runs with `--force`/`--overwrite`. " \
"`dump` overwrites an existing `Brewfile`. " \
Expand Down Expand Up @@ -126,7 +130,7 @@ def run
global = args.global?
file = args.file
args.zap?
no_upgrade = args.no_upgrade?
no_upgrade = args.upgrade? ? false : args.no_upgrade?
verbose = args.verbose?
force = args.force?
zap = args.zap?
Expand Down

0 comments on commit 9eade55

Please sign in to comment.