76 Commits
Author SHA1 Message Date
Bo Anderson cee86846ce Fix Sorbet violations. 2021-08-06 14:03:00 +01:00
Bo Anderson 8e98ce69f3 Stricter handling of CLI args 2021-03-18 16:41:57 +00:00
Mike McQuaidandGitHub dc52ff620b Merge pull request #10031 from hyuraku/only_path_formula_or_cask
add function to define path
2020-12-28 13:22:22 +00:00
Rylan PolsterandMike McQuaid 224c7f44e2 cli/args: --HEAD implies building from source 2020-12-28 08:48:38 +00:00
Mike McQuaid 74fb058c7e More deprecations
More deprecations, disabling and removal for Homebrew 2.7.0.
2020-12-18 14:17:37 +00:00
hyuraku 7be216fcbe change function name 2020-12-17 21:07:43 +09:00
hyuraku d7f9bb6247 add function to define path 2020-12-17 21:07:43 +09:00
Markus Reiter 47b8f96efb Require formula for named arguments. 2020-11-30 04:18:23 +01:00
Markus Reiter 7348185347 Reorder global. 2020-11-30 00:00:02 +01:00
Mike McQuaid d496f5c121 Deprecations for Homebrew 2.6.0
Do the usual deprecate/disable dance for the Homebrew 2.6.0 release.

Not to be merged until the next release will definitely be 2.6.0.
2020-11-24 16:44:02 +00:00
Markus Reiter 7a83f34dd1 Support casks in brew fetch. 2020-11-19 19:46:59 +01:00
Markus Reiter 3ee66d8c0d Add type annotations related to upgrade. 2020-11-16 19:45:15 +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 5f005f67cf Refactor global Cask::Config. 2020-10-01 00:57:10 +02:00
Mike McQuaid 2e5272d04c Deprecate/disable code for Homebrew 2.5.0.
Do the usual "disable deprecations" and "uncomment pending deprecations"
dance and delete/deprecate/disable relevant/related code.
2020-09-03 10:34:22 +01:00
William Ma b4ee7a691c args: Comment out deprecations 2020-08-23 09:02:25 -04:00
William Ma fa7bd3bff6 args: Migrate usage of args loading methods to args.named 2020-08-23 09:02:20 -04:00
Mike McQuaid 3a91c37e66 Fix RuboCop checks. 2020-08-19 17:12:32 +01:00
William Ma 13bc69385c args: Move named args parsing to separate class 2020-08-14 13:49:03 -04:00
Markus Reiter 490e503b1b Replace Homebrew.args with Context. 2020-08-06 16:13:14 +02:00
William Ma cf961caa27 caskroom: Add --caskroom command 2020-08-03 12:35:03 -04:00
Markus Reiter be2d19fe07 Refactor handling of formula options in CLI::Parser. 2020-07-31 17:46:54 +02:00
Markus Reiter 4381c32524 Add test for parsing with ignore_invalid_options. 2020-07-31 15:07:17 +02:00
Markus Reiter d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +02:00
Markus ReiterandGitHub 8d97029b03 Merge pull request #8084 from reitermarkus/cli-parser
Refactor usage of global `Homebrew.args`.
2020-07-30 11:44:12 +02:00
Markus Reiter 05365b5542 Pass args more explicitly in FormulaInstaller. 2020-07-30 03:21:12 +02:00
Markus Reiter c470a6ff43 Pass args directly to prevent_build_flags. 2020-07-30 03:21:12 +02:00
Markus Reiter db467497ca Fix indentation. 2020-07-30 03:21:12 +02:00
Markus Reiter 24eff8f81a Pass args in SoftwareSpec instead of using global args. 2020-07-30 03:21:12 +02:00
William Ma cc63cece76 deps: print cask dependencies
* Allow references to commands when using `brew deps`, e.g. `brew deps
cellery`
* Fix crash when using `brew deps <formula> --installed
--include-requirements`
* Do not include runtime dependencies as direct dependencies when using
`--tree`
2020-07-28 20:24:19 -04:00
William Ma df8d22a29b Remove debugging markers (oops) 2020-07-03 18:27:19 -04:00
William Ma 6e8f5d0958 Modify MultipleVersionsInstalledError to have a generic message 2020-07-03 18:25:49 -04:00
William Ma 525d1ac27d Fix PR issues 2020-07-03 10:33:38 -04:00
William Ma dff61c9eab style: Fix style issues 2020-06-30 12:21:21 -04:00
William Ma 8a05b5258a args: Refactor to load casks directly 2020-06-30 12:08:03 -04:00
William Ma 5900263cab args: Add resolved_formulae_and_unknowns 2020-06-24 14:53:03 -04:00
William Ma cbfea6c125 args: Add field for kegs and unknowns 2020-06-24 11:59:07 -04:00
Mike McQuaid ef95b59ed4 Remove HomebrewArgvExtension
Fixes #5730
2020-05-23 19:39:11 +01:00
Mike McQuaidandGitHub e1f3c8d2b3 Merge pull request #7579 from MikeMcQuaid/deprecations
Update deprecations
2020-05-23 14:38:10 +01:00
Bo Anderson a2939be08a formula_installer: don't propagate --include-test unless requested 2020-05-19 19:12:47 +01:00
Mike McQuaid 4f75a77b08 Update deprecations
Add more deprecations, disable deprecations and remove disabled code.
2020-05-18 13:50:46 +01:00
Mike McQuaid fa0d454817 Replace ARGV#flags_only with Homebrew.args.flags_only
Take two on https://github.com/Homebrew/brew/pull/7490
2020-05-10 15:12:25 +01:00
Mike McQuaidandGitHub 38bd4e6d10 Merge pull request #7521 from MikeMcQuaid/fix-options
cli: fix options handling.
2020-05-07 11:14:27 +01:00
Mike McQuaid c91f397605 cli: fix options handling.
Fix breaking options on taps again (second time in two weeks, sob).

To avoid doing this again: also add a test for this case (that I've
verified would have caught these cases).
2020-05-07 10:33:02 +01:00
Mike McQuaid 85a9fc4abe cli/args: cleanup weird style.
This got autofixed by RuboCop but looks weird.
2020-05-07 10:02:34 +01:00
Mike McQuaid 20a1199375 Refactor CLI to remove unless args_parsed
Refactor the CLI::Args module so it doesn't have different paths to
check arguments depending on whether the arguments have been parsed or
not. Instead, set the values we need from the global ARGV at
first, global initialisation time where they will be thrown away when
the actual arguments are parsed.

To do this some other general refactoring was needed:
- more methods made private when possible
- e.g. `HEAD?` used consistently instead of `head` before arguments
  are parsed.
- formula options are only parsed after named arguments are extracted
2020-05-05 17:47:51 +01:00
Mike McQuaid 9324a85955 cli: readability improvements.
- Rename `cmdline_args` to `argv` to make it more obvious where they
  come from.
- Make the `if args_parsed` early return into `unless args_parsed` to
  (hopefully) make it clearer that this is not the "normal" case and
  to not check `argv` unless arguments haven't been parsed.
2020-05-04 12:42:29 +01:00
Gautham GandMike McQuaid b0ac5bab31 ARGV: Deprecate ARGV.build_bottle? and replace with Homebrew.args.build_bottle 2020-04-26 13:28:44 +01:00
Gautham GandMike McQuaid 676ebf7419 ARGV: Deprecate ARGV.force_bottle? 2020-04-20 16:45:43 +01:00