Skip to content

Commit

Permalink
do brew update/upgrade first in update command
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmdnk committed Jul 13, 2016
1 parent bdb4b21 commit 6d4bb35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/brew-file
Original file line number Diff line number Diff line change
Expand Up @@ -2721,14 +2721,14 @@ class BrewFile:

# Update
if self.opt["command"] == "update":
if not self.opt["noupdateatupdate"]:
self.proc("brew update")
self.proc("brew upgrade --all")
if self.opt["repo"] != "":
self.repomgr("pull")
self.install()
if not self.opt["dryrun"]:
self.cleanup()
if not self.opt["noupdateatupdate"]:
self.proc("brew update")
self.proc("brew upgrade --all")
self.initialize(False)
if self.opt["repo"] != "":
self.repomgr("push")
Expand Down Expand Up @@ -2940,7 +2940,7 @@ def main():
"clean", description=help, help=help,
parents=min_parsers+[dryrun_parser],
formatter_class=argparse.RawTextHelpFormatter)
help = "or -u/--update\nDo pull, install, brew update/upgrade,\n"\
help = "or -u/--update\nDo brew update/upgrade, pull, install,\n"\
"init and push.\n"\
"In addition, pull and push\n"\
"will be done if the repository is assigned.\n"\
Expand Down

0 comments on commit 6d4bb35

Please sign in to comment.