69 Commits

Author SHA1 Message Date
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Mike McQuaid
36dadbee47 caveats: remove python caveats.
These instructions are currently incorrect and need to be ported to
`python` 3.x and `python@2` formulae. Until then it's better to not have
them than have them be incorrect.

Closes #3890.
2018-03-08 08:34:20 +00:00
Mike McQuaid
d54e670a64 requirements: move more to compat. 2017-12-30 20:56:55 +00:00
Mike McQuaid
cacefb2b99
caveats: tweak root_dir definition style. 2017-12-24 07:59:17 +00:00
Dominyk Tiller
92e62ba583
caveats: correct completion/function paths for keg_only 2017-12-23 23:15:59 +00:00
Dominyk Tiller
55d9750056
caveats: fix fish caveats under env filtering 2017-12-11 09:16:39 +00:00
Dominyk Tiller
d70a406fe7
caveats: fix PKG_CONFIG_PATH nudge under env filtering 2017-12-11 06:26:56 +00:00
Markus Reiter
0ea855c6e6 Add missing require "forwardable". 2017-10-24 19:39:40 +02:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Maxim Belkin
336fbb5db2
caveats: making plist_caveats macOS-only 2017-10-16 11:15:54 -05:00
Mike McQuaid
01e9ec9a9f Rubocop: automatic rule fixes. 2017-09-24 21:23:59 +01:00
Misty De Meo
2bd8091ae8 Merge pull request #2804 from mansimarkaur/caveats
Increasing test coverage for caveats.rb
2017-07-25 09:28:46 -07:00
mansimarkaur
ae02b9776a Added tests for python caveats 2017-07-25 21:00:37 +05:30
mansimarkaur
9218d3014d Added tests for plist_caveats 2017-07-25 21:00:26 +05:30
mansimarkaur
5fba0c4776 Added tests for function_completion_caveats 2017-07-25 21:00:04 +05:30
Markus Reiter
3b4ee58c49 Refactor using Forwardable and DelegateClass. 2017-06-28 09:25:31 +02:00
Dominyk Tiller
c081b3d975
caveats: chomp keg_only reason 2017-05-02 19:03:03 +01:00
Dominyk Tiller
285b0bc941
caveats: tweak keg_only wording
Current:
```
This formula is keg-only, which means it was not symlinked into /usr/local.

Qt has CMake issues when linked
```

After:
```
This formula is keg-only, which means it was not symlinked into /usr/local,
because Qt has CMake issues when linked.
```
2017-05-01 16:56:16 +01:00
Mike McQuaid
ba3c46d24f More deprecations.
Deprecate more methods. Internal APIs have been verified to be unused
elsewhere and removed. External APIs have had deprecation methods added.
Existing deprecations have been either upgraded to produce warnings or
no longer deprecated and the reasoning documented.
2017-04-22 16:28:07 +01:00
Alex Dunn
00af5250f0 caveats: combine completion and function messages
Fixes https://github.com/Homebrew/homebrew-core/issues/10338.

Closes #2287.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
2017-03-19 16:32:23 -07:00
Mike McQuaid
7a2c5c0f2f caveats: add newline after keg only reason. 2017-01-26 15:18:32 +00:00
Mike McQuaid
cc22239c99 caveats: tweak keg-only messaging.
Slim down the existing text and make it more obvious what's happening.
Note specifically how to add it to your PATH to convince people to try
that instead of `brew link --force`.
2017-01-25 08:25:16 +00:00
Mike McQuaid
c0a29d6644 caveats, keg: remove linkapps caveats code. 2017-01-09 14:10:26 +00:00
Zach Whaley
14f46625a3 caveats: Differentiate zsh completion files and function files
When installing a file to zsh/site-functions directory, it is assumed this is a zsh completion file,
and the zsh completion caveat is printed after installation.

But not all files in the zsh/site-functions directory are completion files.
Some are files for functions that can be loaded on demand with zsh's autoload command.

- Edit Keg.completion_installed to search specifically for files in the zsh/site-functions
  directory starting with an underscore only (By convention, zsh completion files start with an underscore)
- Add Keg.zsh_functions_installed to search for non-completion files in the zsh/site-functions
- Add Caveats.zsh_function_caveats to print a caveat if non-completion files have been installed
  to zsh/site-functions
2016-12-08 07:23:26 -06:00
Zach Whaley
1995f65308 Add a method for installing fish function files
Fish shell allows third-party software vendors to put their own function files in a directory for their software.
For brew installed Fish shell, this is /usr/local/share/fish/vendor_functions.d
2016-12-04 13:21:42 -06:00
Markus Reiter
a5b11a6a5c Fix Style/GuardClause. 2016-09-23 15:30:07 +02:00
Mike McQuaid
6693915399 rubocop --auto-correct all remaining files.
But remove some manual `.freeze`s on constants that shouldn't be
constants.
2016-09-17 16:14:13 +01:00
Dominyk Tiller
2394d6f2d8
caveats: highlight PKG_CONFIG_PATH if exists
We keep getting issues every now & again about people being confused that
keg_only includes hiding the `pkg-config` files. Perhaps seems reasonable to
start pointing out those exist when they do & a hint on how to access them.

Hidden behind a which check to avoid redundant messages, although `pkg-config`
is an incredibly popular formula. Ran some time tests, no appreciable difference
from the status quo.

If accepted:
Closes https://github.com/Homebrew/homebrew-core/issues/4669.
2016-09-11 04:49:09 +01:00
Martin Afanasjew
8600b9edf1 Update Homebrew/homebrew references in comments
Replace `homebrew` with `brew`, `homebrew-core`, or `legacy-homebrew`
depending on context.
2016-05-02 21:19:09 +02:00
ilovezfs
f54f27d621 Skip tmux warning if reattached to user namespace
The exit status of pbpaste is a proxy for whether the user has set up
reattach-to-user-namespace. It should be 0 if it is set up, 1 otherwise.

This is the same hack as Homebrew/homebrew-services#48.
2016-04-30 16:33:16 -05:00
Mike McQuaid
26118d6225 caveats: recommend brew services for plists.
It simplifies the number of commands and it's now an officially
supported command again.
2016-04-22 09:48:34 +01:00
Xu Cheng
7c9dff1f1e plist_caveats: ensure it ending with newline
Closes Homebrew/homebrew#49374.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-21 12:15:31 +08:00
Alex Dunn
9b030d382c caveats: indent Emacs Lisp directory
This matches similar caveats messages.
2015-12-07 18:45:40 -08:00
Alex Dunn
168a2687f8 stricter audit for Emacs Lisp installs
Require that the subdirectory in site-lisp match the formula name
exactly.  This lets us provide better information in the caveats and
will make it easier for helper methods to write to the correct
location (as in in Homebrew/homebrew-emacs#13).
2015-11-01 17:34:28 -08:00
Xu Cheng
5b321ffb5a caveats: show information based on build options
Fixes Homebrew/homebrew#44729.
Fixes Homebrew/homebrew#40863.
Closes Homebrew/homebrew#44779.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-10 01:33:58 +08:00
Daniel Lee Harple
666ffe5a63 caveats: wrap elisp caveats
Closes Homebrew/homebrew#43517.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-04 16:03:48 +08:00
Alex Dunn
55d685f759 caveats.rb: don't print elisp_caveats for keg-only
Since they won't have been installed into `#{HOMEBREW_PREFIX}/share/emacs/site-lisp/`

Closes Homebrew/homebrew#42839.
2015-08-12 09:38:10 -07:00
Xu Cheng
b121e5fd7b more core file style updated by rubocop 2015-08-06 17:23:56 +08: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
Alex Dunn
81eedecc5a Automatic caveats for emacs lisp files
- The name of the subdirectory under site-lisp may not be exactly the
  same as the name of the package

- `(normal-top-level-add-subdirs-to-load-path)` adds every subdirectory
  of `default-directory` to the load-path, so users don't have to update
  their load-path for every package they install.

Closes Homebrew/homebrew#42309.
2015-08-01 14:48:54 -07:00
Xu Cheng
cc91273f8b caveats: fix extra empty line 2015-07-25 15:07:10 +08:00
Dominyk Tiller
81e4f810c1 caveats: use two spaces instead of 4 2015-07-23 15:17:31 +01:00
Misty De Meo
6d5632cd8f Formula: always print keg_only_text
Fixes Homebrew/homebrew#40724.

Closes Homebrew/homebrew#40725.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2015-06-15 08:21:08 -07:00
Johannes Wienke
de43ac7503 Add support for fish shell completions
* Library/Homebrew/caveats.rb: add caveats comparable to other shells
* Library/Homebrew/formula.rb: define completion directory along the
  conventions explained in the fish documentation for
  $fish_complete_path
* Library/Homebrew/keg.rb: add fish shell to check function for
  installed completions

Closes Homebrew/homebrew#39828.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-06-02 10:09:10 +01:00
Xu Cheng
e5f5145773 caveats: use Formula#full_name 2015-05-29 17:01:53 +08:00
Xu Cheng
fff4b83a52 (un)linkapps: allow unlink/link specific formulae.
Closes Homebrew/homebrew#35080.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-12-19 16:35:45 +00:00
Mike McQuaid
40080a4d3e caveats: don't need plist keg to_path, fix 10.8. 2014-11-27 11:00:58 +00:00
Mike McQuaid
b89bacb9c9 caveats: handle non-Homebrew plists.
Mentioned in Homebrew/homebrew#34484.
2014-11-27 10:48:24 +00:00
Xu Cheng
c5f549e33c caveats: if the last character isn't a newline, add one
Closes Homebrew/homebrew#33962.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-11-07 09:07:54 +00:00
Dominyk Tiller
c6bc9b7e9f caveats: yosemite adjustments
Closes Homebrew/homebrew#33815
2014-11-03 19:29:49 +00:00