75 Commits

Author SHA1 Message Date
Mike McQuaid
bbf5a9f479
env_config: use environment variables consistently
- use e.g. `$HOMEBREW_*` for cases where only the environment variable
  is the entire backtick-quoted string
- use e.g. `${HOMEBREW_*}` for cases where the environment variable is
  part of a backtick-quoted string to make clear what parts are variable
  and what parts are not
- use `export HOMEBREW_*=...` for cases where we're talking about
  setting the environment variable (because it likely needs to be
  exported to work how they want)

Inspired by https://github.com/Homebrew/homebrew-bundle/pull/1579 making
similar changes for Homebrew/homebrew-bundle.
2025-01-27 14:21:27 +00:00
Douglas Eichelberger
057f561d2c Port Homebrew::Cmd::Readall 2024-04-01 10:05:02 -07:00
apainintheneck
fb8c0d2b30 s/Tap.select(&:installed?)/Tap.installed/ 2024-03-08 23:22:00 -08:00
Markus Reiter
771193c80a
Ensure readall runs without API. 2024-02-20 20:44:14 +01:00
Bo Anderson
af7d744af0
Fixes for Ruby 3 2023-09-29 05:25:48 +01:00
apainintheneck
5760ae4fb2 cmd/readall: Cleanup todos
- keep running the command against all os/arch combinations
  as the default
- remove todos and deprecations related to changing the behavior
- create constants for os/arch combinations
2023-09-19 21:33:13 -07:00
Eric Knibbe
c493b5e680
cmd+dev-cmd: fixes for output formatting 2023-09-11 02:29:57 -04:00
Mike McQuaid
7da934f7e2
Deprecate/disable/delete code.
The next release after this is merged will be 4.1.0.

Co-authored-by: Markus Reiter <me@reitermark.us>
2023-07-06 16:56:20 +01:00
Markus Reiter
d55f1b85bf
Add --os and --arch flags to readall. 2023-05-20 20:11:31 +02:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
EricFromCanada
dfc9906184
internal messaging fixes 2023-02-10 23:17:16 -05:00
Mike McQuaid
6b4363092d
Revert "Merge pull request #14548 from Homebrew/revert-14382-deprecate-disable-remove"
This reverts commit 932d2cf3b77c9439a57b6a43577fc8d3b6399a62, reversing
changes made to f4e60482791d2ff628efadfdbf0d14d9237d2d29.
2023-02-07 19:25:51 +01:00
Mike McQuaid
6882ac17e7
Revert "Add deprecations and disables" 2023-02-07 15:13:19 +01:00
Mike McQuaid
59c03cb2a6
Add deprecations and disables
Do the usual dance:
- commented `odeprecated` to `odeprecated`
- `odeprecated` to `odisabled`
- `odisabled` removed
2023-02-03 10:48:43 +00:00
Rylan Polster
174087958b
Simulate all OS/arch combinations in brew readall 2022-10-10 23:56:37 -04:00
Mike McQuaid
e2759fbdff
Deprecate reading all formulae through commands
We added the `--all` flag (now renamed to `--eval-all`) for various
commands for this behaviour so let's start deprecating this.

Also, introduce a `HOMEBREW_EVAL_ALL` environment variable to use the
existing, less secure, behaviour by default and avoid passing
`--eval-all` everywhere.
2022-09-05 13:57:22 +01:00
Mike McQuaid
41e94afda5
Fix brew style
Fixes for https://github.com/Homebrew/brew/pull/12152.

Extracted into a separate PR so this can be merged immediately.
2021-09-30 10:13:53 +01: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
5be4c9b5e0 Upgrade typed sigils. 2020-11-25 17:04:19 +01: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
d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +02:00
Mike McQuaid
047738069f
Speed up timing-out tests.
- make `brew readall` only check Homebrew/brew syntax with no tap
  passed.
- pass specified tap to `brew readall` test for speed
- only shell out once in `FormulaInfo` test for speed
2020-07-27 14:01:22 +01:00
Sean Molenaar
3f6d3e5cf0
Support casks in readall 2020-06-18 20:15:07 +02:00
Mike McQuaid
a7fe0ed847
cmd: use more and cleanup new args APIs. 2020-03-05 09:40:15 +00:00
EricFromCanada
c246207ba0 cmd: updates for command descriptions 2019-12-13 15:24:00 -05:00
EricFromCanada
8a8359cdd4 manpages: sentence rewording for readability
Use active voice when applicable, better verbs & adjectives, preposition usage, proper tense, etc.
2019-08-20 09:05:45 -04:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
e40b171127
Rename cli_parser to cli/parser. 2019-04-17 22:16:50 +09:00
Mike McQuaid
6cb7a00f2d
cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Gautham Goli
bf51e3ea14
readall: Use CLI::Parser to parse args 2018-11-05 18:31:22 +05:30
EricFromCanada
1d2b4ed321 docs: add more missing option descriptions
and improve wording or formatting where necessary.
2018-02-01 16:06:17 -05:00
Mike McQuaid
6114f48d5d Unhide readall and update-reset from manpage.
These are both tools that end-users can find useful on occasion so it
doesn't make sense to hide them.
2017-10-26 16:14:14 +01:00
Mike McQuaid
ed28ed78d1 Merge pull request #3304 from richiethomas/refactor_uses
In 'readall.rb', replaced multi-step 'each' loop with one-line method chain of Ruby enumerator methods
2017-10-20 18:10:31 +01:00
richiethomas
43cbf08018 Remove memoization from uses.rb, as it doesn't result in the expected time complexity savings 2017-10-20 09:42:30 -04:00
richiethomas
b135a70c57 Fix brew style warnings 2017-10-18 20:21:49 -04:00
richiethomas
e5e84eec7d PR feedback- replace '#{HOMEBREW_LIBRARY}/Homebrew/**/*.rb' with '#{HOMEBREW_LIBRARY_PATH}/**/*.rb' 2017-10-18 18:20:44 -04:00
richiethomas
99bccaae13 Remove /cask/ from readall file filter 2017-10-18 17:44:09 -04:00
Maxim Belkin
ad3886b462
readall: update documentation 2017-10-18 14:50:44 -05:00
Richie Thomas
9ef82ae1e2 In 'readall.rb', replaced multi-step 'each' loop with one-line method chain of Ruby enumerator methods 2017-10-12 17:38:02 -04:00
Maxim Belkin
4c0e623bd4
readall: allow readall-ing multiple taps at once 2017-10-10 17:54:42 -05:00
EricFromCanada
afc539f86e Update brew's man page formatting and grammar
Also update command specifications to match descriptions.
2017-02-25 17:37:57 -05:00
Markus Reiter
0ab750bf24 Use module_function for commands. 2016-10-02 00:24:47 +02:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Mike McQuaid
ebdb879fe4 Add --help to all developer commands.
Also, flag those that we never want to be in a manpage.
2016-09-08 09:05:00 +01:00
Mike McQuaid
135ecd1295 Prepare for Homebrew Cask to be imported.
- ignore Cask's files in `readall` (for now, there's an intentional
  syntax error that will need fixed)
- run Cask's tests if they exist
- don't check Cask's files in coverage reports (for now)
2016-08-17 09:11:11 +01:00
Xu Cheng
a8566c9848 various: eliminate the usage of any? (#638)
`any?` is not the opposite of `empty?`. Besides the case that
`[false, nil].any?` will return false, `any?`(O(n)) has much worse
performance than `empty?`(O(1)).
2016-08-05 22:01:32 +08:00
Mike McQuaid
4da990587f tap: run readall when tapping. (#396)
* readall: move readall logic to new class.

* tap: run readall when tapping.

This will prevent tapping an tap with syntax errors from causing issues
for users.

Fixes #58.
2016-07-09 13:51:19 +01:00