73 Commits

Author SHA1 Message Date
EricFromCanada
2e982cd2a2 use odie when commands encounter errors 2021-01-26 15:36:43 -05:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Rylan Polster
da811373d3 Add named_args DSL for commands 2021-01-13 17:09:42 -05:00
Mike McQuaid
74fb058c7e
More deprecations
More deprecations, disabling and removal for Homebrew 2.7.0.
2020-12-18 14:17:37 +00:00
Markus Reiter
5be4c9b5e0 Upgrade typed sigils. 2020-11-25 17:04:19 +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
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Jonathan Chang
6fb72f4d71 Deprecate GitHub basic authentication.
This API authentication path will be disabled on Nov 13 2020.
2020-10-01 17:18:11 +10:00
William Ma
fa7bd3bff6 args: Migrate usage of args loading methods to args.named 2020-08-23 09:02:20 -04:00
Markus Reiter
62a080d410 Pass args correctly in brew gist-logs. 2020-07-31 19:19:37 +02:00
Markus Reiter
d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +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
a11eacc143
cmd/gist-logs: use named DSL. 2020-04-14 14:21:53 +01:00
Mike McQuaid
1e265247ca
rubocop: apply autofixes. 2020-03-13 21:16:18 +00:00
Mike McQuaid
a7fe0ed847
cmd: use more and cleanup new args APIs. 2020-03-05 09:40:15 +00:00
Issy Long
c65b3f3f13
cmd/gist-logs: Fix bug with parsing of command-line arguments
- A user reported the following error when running `brew gist-logs`,
reproducible with any formula:

```
$ brew gist-logs rustup-init
Error: undefined method `length' for nil:NilClass
Please report this bug:
  https://docs.brew.sh/Troubleshooting
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/gist-logs.rb:145:in `gist_logs'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:102:in
```

- From what I can tell, `gist_logs_args.parse` had ended up in the wrong
  method. The `gistify_logs` method already has `formula` (ie the
  formula name) passed into it. But it's the `gist_logs` method that needs
  to do the argument parsing. This was discovered by looking at some other
  recently changed ARGV => Homebrew.args code like cmd/info.
2020-01-14 22:13:19 +00:00
Gautham Goli
959b88266d
ARGV: Replace usages of ARGV.resolved_formulae with Homebrew.args 2020-01-02 13:56:19 +00:00
EricFromCanada
aea6d79d21 option parser: check for extra named args 2019-12-15 00:04:45 -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
EricFromCanada
329c6c78be manpages: relocate some sections
Reorder switches as force/quiet/verbose/debug, --installed before --all, and link to SPECIFYING FORMULAE from top of page.
2019-08-20 08:58:20 -04:00
Mike McQuaid
c4f72312ce
Fixup brew style failures. 2019-04-30 09:19:18 +01:00
Mike McQuaid
73528b6a08
Freeze more strings
Freeze the results changed in #6072.
2019-04-29 13:02:15 +01:00
Markus Reiter
ea76a7aaaf Unfreeze string. 2019-04-28 15:24:17 +02: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
EricFromCanada
89f0fcedbe whitespace fixes 2019-04-13 21:32:04 -04:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
6cb7a00f2d
cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Mike McQuaid
fd74ce2de6
cmd: remove misrendered markdown link. 2019-01-29 08:31:10 +00:00
Mike McQuaid
51f3dd315b
Merge pull request #5589 from GauthamGoli/gist-logs-args
gits-logs: Use CLI::Parser to parse args
2019-01-24 12:44:28 +00:00
Mike McQuaid
e43d400fd2
gist-logs: add missing install require.
Fixes #5586
2019-01-23 08:37:28 +00:00
Gautham Goli
382b5447d8
gits-logs: Use CLI::Parser to parse args 2019-01-23 09:20:49 +05:30
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
4ff0ecd443
gist-logs: don’t upload on unsupported configurations. 2019-01-21 13:58:04 +00:00
Colin Dean
6b2451e6ac
Adds 'password' to method doc 2018-10-21 15:20:45 -04:00
Colin Dean
91cd3cead2 Swap in description of current behavior instead of 1.9.3 hack comment
While working on f10691bcc, I noticed this odd comment and decided to
investigate. I wasn't able to reproduce the undesirable behavior because
I cannot get 1.8.7 to compile with rvm but I did notice through some
testing that iTerm2 displays a lock character when echo mode is
disabled. My intent had been to remove this method because Homebrew has
moved past a Ruby version that would necessitate the "hack" but this
method's behavior is actually desirable today, so I changed the comment
to remove the potential flag and instead left a comment explaining
a good second reason for the method.
2018-10-21 12:56:58 -04:00
Mike McQuaid
b167a88e4d
Merge pull request #5090 from JBallin/gist-token-error
Clarify how to set HOMEBREW_GITHUB_API_TOKEN
2018-10-21 15:41:34 +01:00
Colin Dean
f10691bccc Add --private flag to gist-logs
Co-Authored-By: JBallin <JBallin@users.noreply.github.com>
2018-10-20 14:46:53 -07:00
JBallin
2bf0db40b3 Normalize formatting of gist-logs errors 2018-10-14 20:40:24 -07:00
JBallin
2a1b936f76 Clarify HOMEBREW_GITHUB_API_TOKEN in gist-logs err 2018-10-14 20:40:24 -07:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Gautham Goli
1e0f9fb835 bump-formula-pr: Replace hub with GH API calls to fork and open Pull request 2018-03-31 19:44:55 +05:30
Mike McQuaid
83cca40fc9 RuboCop 0.53.0 manual fixes. 2018-03-08 14:10:02 +00:00
Mike McQuaid
a9c64c319f gist-logs: require API credentials.
Anonymous gists are going away shortly:
https://github.com/blog/2503-deprecation-notice-removing-anonymous-gist-creation
2018-02-19 16:14:32 +00:00
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
7a8f61c28c gist-logs: use full path to brew.
This fixes the command with environment filtering enabled.
2017-12-14 16:44:25 +00:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00