141 Commits

Author SHA1 Message Date
hyuraku
a41a7c94d8 remove cask/cmd 2023-04-19 21:30:42 +09:00
Douglas Eichelberger
09c679e75f Refactor module_function to reduce rbi need 2023-04-17 10:37:59 -07:00
hyuraku
ec0d492c09 move cask/cmd/reinstall to cask/reinstall 2023-04-10 22:07:06 +09:00
Mike McQuaid
253dca568c
Revert "move cask/cmd/reinstall" 2023-03-23 17:06:42 +00:00
hyuraku
31e49d96af move cask/cmd/reinstall to cask/reinstall 2023-03-23 22:50:03 +09:00
Douglas Eichelberger
d56e2884aa Enable typing in cmd/ 2023-03-06 15:01:08 -08:00
Mike McQuaid
fbdec8738d
Warn more when building from source
We warn sometimes when we tell people to build from source and it's
not supported but we don't actually warn non-developers when invoking
the various install commands so: let's start doing so.

While we're here, also update the existing messaging to reflect the fact
we're on Mastodon now too and we don't want maintainers being
individually bothered about errors either.

I've tried to balance having messages here vs. having them be so long
at the beginning of installation that they will be missed or be overly
obnoxious.
2023-02-17 16:10:38 +00:00
EricFromCanada
dfc9906184
internal messaging fixes 2023-02-10 23:17:16 -05:00
Mike McQuaid
46d727b475
HOMEBREW_INSTALL_FROM_API: various improvements.
- flip the messaging to refer to `HOMEBREW_NO_INSTALL_FROM_API` where relevant
- remove some duplicate checks
- better scope checks to just core tap formulae
2023-01-25 14:29:35 +00:00
Bo Anderson
9b99594753
Preliminary compatibility fixes for Ruby 3 2022-10-11 02:53:27 +01:00
Mike McQuaid
04ff6a18f4
Tweak --debug-symbols description. 2022-08-12 09:34:51 +01:00
Lukas Oberhuber
3d60d610dd Merge branch 'master' into debug-symbols 2022-08-10 18:44:09 -10:00
fn ⌃ ⌥
71ab2f6e7a Run periodic cleanup after installing all packages 2022-08-04 07:46:31 -07:00
Lukas Oberhuber
215e545660 brew style 2022-07-26 19:28:30 +01:00
Lukas Oberhuber
d195f22522 Connecting up --debug-symbols flag
This connects the calling of dsymutil and the retention of temporary
files. Still need to connect compilation to flag.
2022-07-26 12:15:53 +01:00
Rylan Polster
b896f6cb0d
Allow more developer commands with HOMEBREW_INSTALL_FROM_API 2022-06-16 21:31:15 -04:00
Rylan Polster
e53ccbc3cd
Remove unnecessary code 2022-06-14 16:06:05 -04:00
Issy Long
0b6b2f04da
cask/reinstall: Support --zap for entirely purging cask files
- The `brew uninstall` command has `--zap`, so let's make `brew
  reinstall` have parity here for a better user experience. (Requested
  in issue 12983.)
- It feels weird that to get my new reinstall test to pass I had to add
  `--zap` to `cask/cmd/install.rb`, not `cask/cmd/reinstall.rb` to get
  the tests to pass. But the `brew reinstall --cask caffeine --zap`
  command worked fine all the time. The CLI argument parser from the
  test run was complaining about not knowing what `zap` was. As a
  result, `--zap` now shows up as a switch in `brew install --help`
  which I'm not 100% convinced is the desired UX. But I've edited the
  description accordingly to specify that it will only work on
  `reinstall` operations (and `--zap` on `install` is a no-op).

```
issyl0 at pictor in /opt/homebrew on reinstall-cask-zap
❯ brew reinstall --cask caffeine --zap
==> Downloading https://github.com/IntelliScape/caffeine/releases/download/1.1.3/Caffeine.dmg
Already downloaded: /Users/issyl0/Library/Caches/Homebrew/downloads/3d6ccfdd3b8d0ab37d1c2468d6e69078c2d31d3b12bf51947c4db21e5f376af2--Caffeine.dmg
==> Implied `brew uninstall --cask caffeine`
==> Backing App 'Caffeine.app' up to '/opt/homebrew/Caskroom/caffeine/1.1.3/Caffeine.app'
==> Removing App '/Applications/Caffeine.app'
==> Dispatching zap stanza
==> Trashing files:
~/Library/Application Support/com.intelliscapesolutions.caffeine
~/Library/Preferences/com.intelliscapesolutions.caffeine.plist
~/Library/Caches/com.intelliscapesolutions.caffeine
~/Library/HTTPStoages/com.intelliscapesolutions.caffeine.binarycookies
==> Removing all staged versions of Cask 'caffeine'
==> Installing Cask caffeine
==> Moving App 'Caffeine.app' to '/Applications/Caffeine.app'
🍺  caffeine was successfully installed!
```
2022-04-09 16:37:23 +01: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
Rylan Polster
0b8032d421
Document HOMEBREW_INSTALL_FROM_API 2021-10-22 12:37:57 -04:00
Rylan Polster
5d536d66fc
Rename HOMEBREW_JSON_CORE to HOMEBREW_INSTALL_FROM_API 2021-08-27 00:24:15 -04:00
Rylan Polster
99635bf3ae
Remove need for homebrew/cask to be tapped 2021-08-14 16:17:26 -04:00
Rylan Polster
737dd1654b
Refactor API methods 2021-08-06 04:31:27 -04:00
Rylan Polster
1e34b69cd4
Prioritize installing from JSON if env var is set 2021-07-12 03:23:42 -04:00
Rylan Polster
e316c4f013
Rename Utils::BottleAPI to BottleAPI 2021-07-05 11:45:15 -04:00
Rylan Polster
ca5f6026ed
Fix tests 2021-07-05 11:29:27 -04:00
Rylan Polster
36dd69dd60
Rename download_bottles to fetch_bottles 2021-07-05 10:55:34 -04:00
Rylan Polster
22f986b89a
Install formulae from JSON files 2021-07-04 12:38:59 -04:00
Allen Reese
128f63db53 reinstall: add support for the --git option 2021-06-30 10:16:46 -07:00
Bo Anderson
d14a0bb131
Remove FormulaInstaller.prevent_build_flags 2021-03-22 16:11:27 +00:00
Bo Anderson
8e98ce69f3
Stricter handling of CLI args 2021-03-18 16:41:57 +00:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Dawid Dziurla
332372469f
cmd: indicate multiple named args in usage banner 2021-01-15 13:04:00 +01:00
Rylan Polster
da811373d3 Add named_args DSL for commands 2021-01-13 17:09:42 -05:00
Markus Reiter
7236faee25 Properly pass cask options in reinstall. 2021-01-10 20:19:38 +01:00
hyuraku
4f74134169 cmd/reinstall: refactor 2020-12-29 20:40:26 +09:00
EricFromCanada
bcdb0c7698 upgrade: show upgradeable dependents during dry run 2020-11-17 18:26:35 -05:00
EricFromCanada
72bc057014 manpage: fixes for formatting 2020-11-16 08:02:50 -05:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
10e3b63b7b Inline install, reinstall and upgrade options. 2020-10-08 11:33:38 +02:00
Markus Reiter
d6b563e752 Support min_named :formula_or_cask. 2020-10-08 11:12:17 +02:00
Markus Reiter
7743fed77b Add “GLOBAL CASK OPTIONS” section to man page. 2020-10-08 11:07:35 +02:00
Markus Reiter
e40eece17b Add cask options to brew reinstall. 2020-10-08 11:06:04 +02:00
Markus Reiter
d443d9ab75 Include cask in brew reinstall help text. 2020-10-08 11:06:04 +02:00
Mike McQuaid
dbe427073d
Merge pull request #8399 from MLH-Fellowship/migrate-to-args-named
args: Migrate usage of args loading methods to args.named
2020-08-25 10:07:27 +01:00
Markus Reiter
4937e4bbc3 Refactor and document Upgrade. 2020-08-24 19:42:24 +02:00
William Ma
fa7bd3bff6 args: Migrate usage of args loading methods to args.named 2020-08-23 09:02:20 -04:00
Markus Reiter
b48bc316e0 Use CLI::Parser for cask commands. 2020-08-13 05:15:15 +02:00
William Ma
907d4d7f74 Add shared methods for uninstalling, reinstalling casks 2020-08-05 11:04:40 -04:00