78 Commits

Author SHA1 Message Date
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Mike McQuaid
a7fe0ed847
cmd: use more and cleanup new args APIs. 2020-03-05 09:40:15 +00:00
Gautham Goli
22e25dd593 argv: move formulae to cli/args 2019-12-11 16:36:23 +05:30
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
b4303cd983 manpages: fix command & option descriptions 2019-08-20 09:03:33 -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
EricFromCanada
6340792f78 manpages: output formatting fixes 2019-08-20 08:28:35 -04:00
EricFromCanada
a3e0647797 manpages: whitespace fixes 2019-08-20 08:24:20 -04:00
Mike McQuaid
3cfb028e7f
Resource#fetch: verify downloads by default.
This API is used internally correctly and externally mostly correctly
but #6230 reveals the external usage is fairly confusing and a bit
unsafe by default. Preserve the existing API while verifying the
checksum by default and providing an opt-out. Using the existing, safe
method will result in a double verification of the checksum which is
harmless. A Homebrew/homebrew-core PR will follow shortly to address
those cases.

Fixes #6230
2019-06-15 17:22:45 +01:00
Mike McQuaid
c4f72312ce
Fixup brew style failures. 2019-04-30 09:19:18 +01: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
Mike McQuaid
867b155479
Add missing conflicts to command options. 2019-01-29 19:39:41 +00:00
Mike McQuaid
fe8f3218d3
cmd/fetch: add missing --build-bottle argument. 2019-01-29 11:35:41 +00:00
Gautham Goli
a6a3ed1cee
fetch: Use CLI::Parser to parse args 2019-01-29 11:35:40 +00:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Andrew Janke
8b55cb5ecb Refactor commands to remove "require cmd/help" 2018-06-07 04:59:59 -04:00
ilovezfs
69db925e8a fetch: also fetch resources' patches 2018-01-22 01:10:14 -08:00
Markus Reiter
175ca909ee Clean up code style and remove .rubocop_todo.yml. 2017-10-08 16:10:37 +02:00
Mike McQuaid
566d3cb58b Document all short flags. 2017-04-02 10:14:58 +01:00
Mike McQuaid
79f9896d2f bottles: --force-bottle feigns or_later.
When reproducing issues with software that hasn’t been bottled yet on
your version of macOS it can sometimes be helpful to use `or_later`
bottle functionality i.e. just use the bottle for the latest version of
macOS available. This maps well to the existing `--force-bottle`
argument so it will now act as if the latest bottle has a `or_later`
ending.
2017-01-02 16:05:14 +00:00
Markus Reiter
c36f42ce95 Remove private_class_method from commands. 2016-10-02 00:24:47 +02:00
Markus Reiter
0ab750bf24 Use module_function for commands. 2016-10-02 00:24:47 +02:00
Mike McQuaid
3f9cce0a03 Use new "macOS" naming where appropriate.
Not quite a mass replacement as I've used OS X and Mac OS X where
describing specific older versions and added compatibility methods
for things in the DSL.
2016-09-18 19:57:19 +01:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Mike McQuaid
c8084b1743 cmd/fetch: fix Rubocop warnings. 2016-09-11 17:58:59 +01:00
Martin Afanasjew
5a90e7190b fetch: document --retry option (#225) 2016-05-09 15:37:01 +02:00
Andrew Janke
d887dd39ec brew install: make -s apply only to given formula, not deps (#205) 2016-05-06 12:02:13 -07:00
Andrew Janke
12686ad417 cmd/fetch: fix typo in doco 2016-05-06 11:03:38 -04:00
Max Nordlund
10edfcd218 Fix documentation error
Closes #10.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-10 22:59:25 +02:00
Max Nordlund
fa1fd70a37 Add all the top level comments 2016-04-10 22:59:25 +02:00
Xu Cheng
93cbab0021 Revert "brew fetch: only include sha256 in output"
This reverts commit 0b38f9b286bc61e2b2d2232f80ea8ebc5909fb07.
2016-03-20 14:55:58 +08:00
Andrew Janke
a74e872409 brew fetch: only include sha256 in output
Closes Homebrew/homebrew#50067.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-03-14 19:39:15 +08:00
Mike McQuaid
84a85b97ff Revert "formula_installed: tweak source build behaviour."
This reverts commit 5dd200c6b40f4fa9cc3a70cbc9ca2885e4626943.

Closes Homebrew/homebrew#47889.
2016-01-19 10:16:59 +00:00
Mike McQuaid
e7bffe4809 formula_installed: tweak source build behaviour.
Currently `brew install —build-from-source wget` builds all the
dependencies also from source. I can see people wanting to do this when
`HOMEBREW_BUILD_FROM_SOURCE` is set by passing it on the command-line
is mostly just annoying; it means you have to use `—build-bottle` and
deal with the CFLAGS and `post_install` changes if you want to build
from source. Tweak `formula_installer` so this behaviour is more
intuitive.

Closes Homebrew/homebrew#47889.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-17 20:05:32 +00:00
Mike McQuaid
17e5c1409f fetch: fall back to source if bottle fails.
This matches the behaviour when `brew install`ing formulae.

Closes Homebrew/homebrew#46490.

Closes Homebrew/homebrew#46619.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-12-06 21:30:46 +00:00
Alex Dunn
818c65542d remove Formula#file_modified?
It's been more trouble than it's worth.

Fixes Homebrew/homebrew#43607.
Closes Homebrew/homebrew#43049.

Closes Homebrew/homebrew#43615.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-09-06 13:13:59 +01:00
Baptiste Fontaine
8ba0fb9fcf unnecessary calls to .select simplified
These are minor perf optimizations.

Closes Homebrew/homebrew#43028.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-08-18 00:18:22 +02:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Dominyk Tiller
c0ef6567b8 fetch: don't flag fs modification 2015-07-23 22:28:07 +01:00
Alex Dunn
da2e4d417d fetch/build formula from source when modified
closes Homebrew/homebrew#36068

Closes Homebrew/homebrew#41397.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-07-18 19:30:30 -07:00
Mike McQuaid
356e75487e Point to a tap when installing or fetching.
When installing or fetching and stuff goes wrong we can't always catch
the error and redirect to the tap. Instead, point to the tap before we
do anything failure-prone and hopefully that'll encourage people to
file issues in the right place. If not we can say that explicitly.

Closes Homebrew/homebrew#33220.
2014-10-21 23:04:55 +01:00
Jack Nagel
c5885757e5 Store the object itself in the failed download set
Patches don't respond to "name".
2014-09-10 22:09:15 -05:00
Jack Nagel
3a96a1a594 Use a set to track failed downloads 2014-08-22 22:55:10 -05:00
Jack Nagel
fd4f985cb6 Rescue only DownloadError 2014-08-22 22:55:10 -05:00
Mike McQuaid
2d91613d06 fetch: retry the download on a failure. 2014-08-16 08:49:01 +01:00
Jack Nagel
10a1952d2c Only "extend self" once on the Homebrew module 2014-06-19 13:10:36 -05:00
Jack Nagel
86cdd812a2 Teach fetch to download patches 2014-03-13 21:35:41 -05:00
Jack Nagel
a8fe989733 Update fetch command for generalized bottle implementation 2014-03-10 14:56:02 -05:00