4116 Commits

Author SHA1 Message Date
Mike McQuaid
748af9897e
Merge pull request #7738 from dankessler/infopath-fix
append colon (:) to end of INFOPATH for brew shellenv
2020-06-17 09:43:29 +01:00
Shaun Jackman
b5584fc035 update: Update the symbolic ref origin/HEAD 2020-06-16 23:20:04 -07:00
Misty De Meo
4305ff9602 vendor-install: upgrade to 2.6.3_2 2020-06-16 13:53:28 -07:00
Dan Kessler
30b04daa8a append colon (:) to end of brew's part of INFOPATH in brew shellenv
The behavior of some programs (e.g., emacs) differs depending on
whether INFOPATH is terminated in a colon or not. For example, the
info viewer built into emacs has a default list of places from which
it will draw info files, and it will only check this if either (a)
INFOPATH is unset, or (b) INFOPATH ends in a colon.

Currently brew shellenv prepends to the existing $INFOPATH and will
separate with a colon if $INFOPATH already exists, but if it does not
it will not terminate in a colon. As a result, info
pages (like emacs and elisp) are missing from the info viewer.

The existing brew shellenv logic used a parameter expansion trick to
include a colon only if it was prepending to an extant INFOPATH, but
because we want brew's contribution to the INFOPATH to always end in a
colon (whether there's an existing INFOPATH or not), we don't have to
use the parameter expansion trick

This commit only changes behavior for "other" shells (i.e., not fish,
csh, or tcsh) since I don't know how to append a colon to variables in
these shells.
2020-06-12 20:47:43 -04:00
Lionell
8a6fa73dc1 Merge branch 'license' of https://github.com/MLH-Fellowship/brew into license 2020-06-13 01:04:39 +08:00
Misty De Meo
f4ff5a22f8
vendor-install: remove ARM 2020-06-10 13:08:09 -07:00
Misty De Meo
0c1cf592b7
Bump minimum OS to Yosemite 2020-06-10 13:08:01 -07:00
William Ma
864cc76b3b Print license information in brew info 2020-06-10 12:29:54 -04:00
Mike McQuaid
0b6ae538d1
Merge pull request #7545 from maxim-belkin/keep_ruby_path_set
utils/ruby.sh: search PATH for Ruby on Linux. update.sh: keep HOMEBREW_RUBY_PATH set.
2020-05-27 15:19:12 +01:00
April Arcus
0b4febceaf fix undefined variable interpolation in tcsh 2020-05-25 10:46:10 -07:00
Mike McQuaid
fd343c0578
cmd/info: fix missing formula reference.
Fixes #7639
2020-05-23 16:32:39 +01:00
Mike McQuaid
e1f3c8d2b3
Merge pull request #7579 from MikeMcQuaid/deprecations
Update deprecations
2020-05-23 14:38:10 +01:00
Mike McQuaid
11cf77be17
formula_installer: prelude before fetch.
This ensures that dependencies are verified and tapped before they are
fetched. `FormulaInstaller#lock` has been moved into
`FormulaInstaller#install` to avoid locking until necessary.

While we're here, don't compute dependencies before fetching if we're
not going to use them.
2020-05-23 13:40:13 +01:00
Mike McQuaid
4f75a77b08
Update deprecations
Add more deprecations, disable deprecations and remove disabled code.
2020-05-18 13:50:46 +01:00
Maxim Belkin
328c75fc33
Move logic related to HOMEBREW_RUBY_PATH to utils/ruby.sh 2020-05-15 10:30:45 -05:00
skim
bb27478de0
fixes uninstall if formula is unavailable 2020-05-13 17:56:36 -07:00
Shaun Jackman
133ee7966d shell: Use .profile unless .bash_profile exists 2020-05-13 09:30:02 -07:00
Maxim Belkin
1cba5821fd
cmd/update.sh: define conditions for unsetting HOMEBREW_RUBY_PATH 2020-05-12 11:50:12 -05:00
Maxim Belkin
9124e07b54
cmd/update.sh: keep HOMEBREW_RUBY_PATH set when updating 2020-05-11 10:47:03 -05:00
Mike McQuaid
08a9f0e1c0
Use FormulaInstaller#fetch before #prelude. 2020-05-11 09:38:26 +01:00
Michelle Nguyen
2264c08cee
Fetch formula resources before unlinking during upgrade.
Fixes #6374.
2020-05-11 09:37:56 +01:00
Mike McQuaid
a3474e8361
uninstall: tweak paths array logic. 2020-05-10 19:22:54 +01:00
Mike Fiedler
e4823ea6fe
cmd/uninstall: fix Array comparison
In #7526 a comparison for `paths` was introduced, but if `paths` is ever
`nil`, this triggers an error.

Coercing the variable to an Array should alleviate this problem, as
`nil.to_a` produces an empty and comparable Array.

Fixes #7540

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
2020-05-10 11:28:42 -04:00
Mike McQuaid
04ae589d5c
cmd/uninstall: note etc files that stay around.
We don't remove `etc` files on uninstall. Now we have `pkgetc`, though,
we have a pretty decent guess at what files in `etc` may belong to a
given package and can warn about them being left around on uninstall.

Thoughts: should we do the same thing for `var`? I don't see it being
used nearly as consistently.
2020-05-08 10:37:51 +01:00
Mike McQuaid
c05b3a755f
shellenv: recommend .bash_profile
Fixes #7516
2020-05-07 10:34:59 +01:00
Bob Wombat Hogg
63e6632aa9 docs: Update tap-pin and tap-unpin disable explanations
I interpreted the existing message as meaning "you don't pin
a tap any more, rather you pin a specific formula from that
tap". I.e. the command still worked, but it had to be done
on a per-formula basis (eg. `brew tap-pin linuxbrew/xorg/mesa` instead
of just `brew tap-pin linuxbrew/xorg`)

IMO, this makes it clearer that the command itself is no longer
supported.
2020-05-06 08:54:54 -04: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
6123cdb767
Improve Homebrew Portable Ruby messaging
As-of https://github.com/Homebrew/homebrew-portable-ruby/pull/100 we've
removed ARM builds for Portable Ruby due to months of breakage.
Similarly, when we last bumped Portable Ruby the ARM build was much
delayed but, despite Homebrew/brew being completely unusable to anyone
using it on ARM in that case, no-one complained or filed issues.

Instead of attempting to maintain and update a Portable Ruby on niche
(Homebrew) platforms like ARM (or, in past/future PPC) improve the
messaging to provide users with a workaround.

Now we allow only a major/minor version match it should be pretty
doable for those users to install e.g. a prebuilt Ruby binary from a PPA
or built it from source if needed using `ruby-build` and `rbenv`.

The messaging could be improved further but we're somewhat limited by
`ruby.sh` and `vendor-install.sh` being separate. I'm tempted to combine
them (or at least have `vendor-install.sh` not be so generic as to not
be able to give Ruby-specific advice).
2020-05-02 13:53:45 +01:00
Gautham G
38c24d134c ARGV: Deprecate ARGV.casks and replace with Homebrew.args.casks 2020-05-02 13:21:16 +05:30
Mike McQuaid
fdc5096e09
Merge pull request #7461 from herder/shell_detection
[fix] Improve shell detection in shellenv
2020-04-29 10:00:12 +01:00
Niklas Herder
2f4d4b8684
[fix] Improve shell detection in shellenv
$SHELL is set to only the binary name in some environments (e.g. fish, not /usr/bin/fish), causing detection of fish/csh/tsch to fail without this change.
2020-04-29 08:20:06 +02:00
Bo Anderson
95f226cf51 cmd/list: fix Hombrew typo 2020-04-27 00:47:24 +01:00
Mike McQuaid
701c1811d5
cleanup: all configuring max age days.
Fixes #7320
2020-04-20 10:33:15 +01:00
EricFromCanada
9d6eb41fc5 cmd/dev-cmd: misc. usage and wording fixes 2020-04-19 13:31:54 -04:00
EricFromCanada
b6809f2dda analytics: rearrange help into subcommand format 2020-04-19 11:50:28 -04:00
Mike McQuaid
4e5c8a35e5
cmd/upgrade: handle nil runtime_dependencies.
Fixes #7360
2020-04-15 10:52:48 +01:00
Mike McQuaid
85e65f6d9c
Move some cmd to dev-cmd.
None of these made sense as end-user commands.
2020-04-14 14:29:38 +01:00
Mike McQuaid
a11eacc143
cmd/gist-logs: use named DSL. 2020-04-14 14:21:53 +01:00
Mike McQuaid
4fb649cad1
cmd, dev-cmd: use args.formulae_paths.
This makes these commands robust to invalid syntax.
2020-04-14 14:21:38 +01:00
Mike McQuaid
20795b5cc7
cmd/style: do FormulaAudit by default.
Otherwise this is just doing `rubocop` checks.
2020-04-13 16:01:26 +01:00
Mike McQuaid
d52e870b07
rubocop: remove NewFormulaAudit.
This is no longer used anywhere.
2020-04-13 16:01:26 +01:00
Alessandro Di Felice
b752efbd37
Fix KeyOnlyReason property access. 2020-04-12 10:08:35 -05:00
Mike McQuaid
7f32e23a65
cmd/link: don't link shadowed macOS software. 2020-04-12 13:12:03 +01:00
Jonathan Chang
bec303de86
tap: update shallowing logic
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-04-11 22:41:04 +10:00
Jonathan Chang
945fb11d51 tap: default to --shallow on CI 2020-04-11 13:12:09 +10:00
Jonathan Chang
2acb4771fe tap: permit creating shallow taps for CI 2020-04-09 18:46:47 +10:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Mike McQuaid
79bc4f1136
update: make git rebase quiet on Mojave system Git.
Fix regression from https://github.com/Homebrew/brew/pull/7260.

This code makes me sad.
2020-04-03 08:59:11 +01:00
Mike McQuaid
fe5717519c
update: make rebase quiet.
I tested the workaround with the newest Git and the Catalina system Git
and it wasn't needed in either case. We can re-add it if we get
complaints with supported Git versions.

Fixes https://github.com/Homebrew/brew/issues/7259
2020-04-02 09:00:25 +01:00
Bo Anderson
870bae8ce6 cmd/update-report: check for HOMEBREW_DISABLE_LOAD_FORMULA 2020-03-28 22:15:07 +00:00