116 Commits
Author SHA1 Message Date
Carlo CabreraandGitHub db648bcded Merge pull request #12717 from carlocab/install-pin
install: respect pins when auto-upgrading
2022-01-14 01:06:38 +08:00
Carlo Cabrera 0021a53713 Fix brew style 2022-01-14 00:19:14 +08:00
Carlo Cabrera 022c5dfad0 Suggest brew unpin if formula is pinned
This will help users avoid the error where `brew` refuses to upgrade
because the formula is pinned.
2022-01-14 00:09:51 +08:00
Carlo Cabrera dd551a8060 install: respect pins when auto-upgrading
Closes #12716.
2022-01-13 23:57:51 +08:00
Bob Lail 9b678c365b Add flag --overwrite to brew install to govern the keg-linking step
Allows you to avoid the `Keg::ConflictError` recommending that you invoke `brew link --overwrite` in scenarios when you know that that's how you'd proceed anyway.
2022-01-10 14:23:33 -06:00
Mike McQuaid 11c5f8f05a Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:

- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependents
- automatically reinstalling broken dependents

For each of these: let's improve the documentation of the commands
whose behaviour is changed and the environment variables themselves.
2021-11-25 09:10:59 +00:00
Bo AndersonandMike McQuaid 9d5f4e8ed5 Fix undefined method error following CannotInstallFormulaError 2021-09-14 10:43:38 +01:00
fn ⌃ ⌥ 5a94c43b3f install, upgrade: fix installation attempt check 2021-09-13 10:28:13 -07:00
fn ⌃ ⌥ 15e8852128 upgrade: add install_formula helper method 2021-09-10 08:39:36 -07:00
fn ⌃ ⌥ 0c3afa5837 install, upgrade: run formula installer prelude before fetching 2021-09-10 06:15:55 -07:00
fn ⌃ ⌥ a96e286400 install: check if formula is already linked before fetching 2021-09-10 06:15:47 -07:00
fn ⌃ ⌥ eec60c4086 install, upgrade: don't print message if formula already installed 2021-09-09 10:54:18 -07:00
FnControlOption cf2800afec install: fetch all formulae before install 2021-09-01 22:42:20 -07:00
Connor Mann 79f9a9aac6 Move install-specific code to install.rb 2021-06-15 15:59:00 -04:00
Connor Mann 13e1457249 Consolidate shared install and upgrade logic 2021-06-15 10:11:40 -04:00
11d030e897 Update Library/Homebrew/install.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-06-15 09:38:08 -04:00
Connor Mann f0601e91bc Change outdated message 2021-06-14 11:43:44 -04:00
Connor Mann c1ad3d09b8 Add present? check to linked_kegs 2021-06-14 11:42:49 -04:00
Connor Mann 4bbfe351e2 Fix keg re-linking logic for failed upgrades 2021-06-14 11:31:55 -04:00
Connor Mann 48641f3a3a Fix method typo 2021-06-14 11:28:16 -04:00
Connor Mann 4b59636ae8 Merge branch 'master' into install-upgrade-outdated 2021-06-14 11:16:20 -04:00
Rylan Polster e3cf41e3ab Add missing negations 2021-06-10 11:47:42 -04:00
Rylan Polster 30be3e2340 Refactor install methods 2021-06-10 10:53:41 -04:00
Mike McQuaidandGitHub 786a06d3ed Library/Homebrew/install: fix whitespace. 2021-01-26 10:21:55 +00:00
db52d6a725 Update Library/Homebrew/install.rb
Incorporate suggested wording

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-01-25 10:39:29 -07:00
David Cowden 0562d0c2b6 fixup: reword error message and remove pointless variable 2021-01-14 14:26:41 -07:00
David Cowden 9b4fea602b install: add workaround for rosetta2 path error msg
It's possible the user's terminal emulator is running under rosetta2.
Consequently, the i86_64 version of the ruby interpreter will be used.
Likely, the right thing to do is simply install the arm64 version of the
requested package. This can be accomplished using: arch -arm64 brew ...

Fixes: #10313
2021-01-13 21:49:44 -07:00
Francois-Xavier Coudert b02acb37c0 Remove warning on ARM 2020-12-24 14:15:03 +01:00
Mike McQuaid abb4038db0 install: switch Rosetta 2/Intel messaging order. 2020-12-22 11:28:45 +00:00
Mike McQuaid fe8f3c4b13 install: clarify "on Intel" error if under Rosetta 2.
Inspired by https://github.com/Homebrew/brew/issues/10088
2020-12-22 08:41:49 +00:00
Mike McQuaid 2378a0bbb3 install: add ARM migration instructions. 2020-11-12 19:14:46 +00:00
c91ff3c399 install: fix prefix checks.
Co-authored-by: Bo Anderson <mail@boanderson.me>
2020-11-12 18:58:03 +00:00
Mike McQuaid 5afff3f3aa Handle macOS Homebrew on ARM
- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux

While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
  don't support it (yet).
- Don't reference non-existent IRC channel
2020-11-12 17:06:47 +00:00
Markus Reiter 24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid f161e56ce0 ENV: check SDK exists when setting up.
Reuse code from `brew doctor` that checks and produces a fatal error
and from `install.rb` that runs it.

Closes #8646
2020-09-11 12:05:22 +01:00
Markus Reiter 7fce76d176 Refactor and document Install. 2020-08-17 19:17:18 +02:00
Markus Reiter 20bd4280ff Pass args.cc to Install. 2020-07-30 03:21:12 +02:00
Markus Reiter f8934c0255 Pass args in Install and Messages instead of using global args. 2020-07-30 03:21:12 +02:00
Mike McQuaid 11c875d747 macOS Big Sur tweaks
- output warnings when running on ARM
- require Xcode 12
- use 11.0 as the version number
2020-06-23 14:11:05 +01:00
Misty De Meo 89b42bc522 Install: permit ARM-based Macs 2020-06-22 12:55:59 -07:00
Gautham G b40e33aeb8 ARGV: Deprecate ARGV.cc and replace with Homebrew.args.cc 2020-05-04 11:14:55 +05:30
Trung LeandMike McQuaid 3df97b20d5 Add PowerPC64 CPU
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-04-30 23:37:45 +10:00
Issy Long 341ea60807 Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00
Mike McQuaid 704ea4b4bb install: add comment explaining why we're creating these files. 2019-09-18 09:44:29 +01:00
Mike McQuaid 8d6ac3869c install: keep_file must be a Pathname. 2019-09-18 09:44:28 +01:00
Ivan VerevkinandMike McQuaid 878b79d456 install: create .keepme files in directories. 2019-09-18 09:44:06 +01:00
Mike McQuaid 36dbad3922 Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
EricFromCanada 89f0fcedbe whitespace fixes 2019-04-13 21:32:04 -04:00
Mike McQuaid 589ed8e17c Tweak diagnostic checks
- Make `gist-logs` perform more checks
- Don't complain about a non-/usr/local install at install time unless
  actually building from source.
- Show more checks output on a build error
- Improve naming of checks methods
2019-01-21 19:23:31 +00:00
Mike McQuaid 3a0e0dca36 Output more warnings on unsupported configurations 2019-01-21 13:58:03 +00:00