Commit Graph
58 Commits
Author SHA1 Message Date
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 McQuaid af278b15de cli/parser: add formulae method.
This removes the coupling on args.formulae before it has been parsed.
2020-05-10 15:10:36 +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
Mike McQuaid af8091a279 Remove ARGV_WITHOUT_MONKEY_PATCHING
Our usage of `ARGV` will go away soon enough and maintaining state
between `ARGV` and `ARGV_WITHOUT_MONKEY_PATCHING` is futile.

Fixes #7397
2020-04-20 10:27:14 +01:00
Mike McQuaidandGitHub 2bbcab5615 Merge pull request #7333 from GauthamGoli/argv-cleanup-21
cli/args: Make build_from_source public instance method
2020-04-19 13:23:34 +01:00
Mike McQuaid 8d868b739c cli/args: simplify initialisation.
Move some logic from `CLI::Parser` to `CLI::Args` to simplify and make
more consistent the initialisation process.
2020-04-18 21:14:35 +01:00
Mike McQuaid bff0a90b37 cli/args: fix formulae_paths.
The `Pathname`s don't have `name`s to `uniq`.
2020-04-15 16:27:22 +01:00
Mike McQuaid 5366da76fd cli/args: add formulae_paths helper.
This allows getting the formulae passed as arguments while not having
to read the file or raising an exception on invalid syntax.
2020-04-14 14:20:43 +01:00
Gautham G b05c72b98b cli/args: Make build_from_source public instance method 2020-04-12 19:12:16 +05:30
Gautham G 2bdbca1280 Revert "Merge pull request #7289 from Homebrew/revert-7279-argv-cleanup-18"
This reverts commit 64fd839c95, reversing
changes made to 6f50801b37.
2020-04-11 18:50:24 +05:30
Mike McQuaid 3381cbf5c7 Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Gautham GoliandGitHub ad7e1d48a5 Revert "ARGV: Deprecate ARGV.build_formula_from_source? and ARGV.build_from_source?" 2020-04-05 23:01:57 +05:30
Gautham G 602cb7e636 ARGV: Deprecate ARGV.build_formula_from_source? and ARGV.build_from_source? 2020-04-05 16:47:47 +05:30
Mike McQuaid 8975dfb6ff Merge pull request #7238 from Homebrew/dependabot/bundler/Library/Homebrew/unf_ext-0.0.7.7
build: bump unf_ext from 0.0.7.6 to 0.0.7.7 in /Library/Homebrew
2020-03-29 19:36:51 +01:00
Gautham G 7ad6dab288 ARGV: Deprecate ARGV.collect_build_args 2020-03-28 21:00:59 +05:30
Dawid Dziurla 6c5109be7a cli/parser: chomp '=' from comma_array flag name 2020-03-16 15:02:43 +01:00
Mike McQuaid 1e265247ca rubocop: apply autofixes. 2020-03-13 21:16:18 +00:00
Mike McQuaid 66155ea370 cli/parser: add named/min_named helpers. 2020-03-05 09:25:14 +00:00
Mike McQuaid f13b0513ea cli/parser: avoid using remaining. 2020-03-04 17:27:01 +00:00
Mike McQuaid 4d9e117430 args: avoid using remaining. 2020-03-04 17:26:38 +00:00
Mike McQuaid 2bf990bb29 cli/args: add no_named? helper. 2020-03-04 17:26:15 +00:00
Mike McQuaid 8a9dcad2c7 Move more command handling logic to commands.rb. 2020-02-02 17:05:45 +01:00
Mike McQuaid eb87651341 Revert "Revert "help: print cli/parser help message if used"" 2020-02-02 16:36:59 +01:00
Gautham Goli acde828a45 ARGV: Replace ARGV.verbose? with Homebrew.args.verbose? 2020-02-02 14:00:04 +01:00
Gautham Goli 685a6b4da6 ARGV: Replace usages of ARGV.named with Homebrew.args.named 2019-12-18 20:38:21 +05:30
EricFromCanada aea6d79d21 option parser: check for extra named args 2019-12-15 00:04:45 -05:00
Gautham Goli 2b95755afe CLI::Args: Make processed_options read-only 2019-12-11 16:36:23 +05:30
Gautham Goli 28e62b52d1 cli_args: Remove cyclic dependency on ARGV 2019-12-11 16:36:23 +05:30
Gautham Goli 22e25dd593 argv: move formulae to cli/args 2019-12-11 16:36:23 +05:30
Zach Auten fd429d0d75 Moved kegs from ARGV to args.rb 2019-11-09 11:56:47 -05:00
Gautham Goli e88f6b9da9 args: Add passthrough method and tests 2019-09-26 10:33:40 +05:30
Gautham Goli d18b122272 cli_args: Fix options_only and flags_only 2019-09-22 20:28:43 +05:30
Mike McQuaidandGitHub 963cc556d4 Revert "argv: move options_only to cli/args" 2019-09-13 09:34:43 +01:00