87 Commits

Author SHA1 Message Date
Sean Molenaar
cb23433612
feat: only block cask install on Linux 2024-12-14 15:49:09 +01:00
Bo Anderson
eb93d844d8
Fix NoSuchKegFromTapError handling 2024-09-16 05:46:14 +01:00
Rylan Polster
8cb62b1398
Set correct tap when loading installed casks 2024-09-10 13:34:40 -04:00
Douglas Eichelberger
cefae82307 Fix tests 2024-08-10 11:20:53 -07:00
Bo Anderson
ae9d5f9f14
cli/named_args: raise priority of core casks 2024-07-12 05:27:57 +01:00
Mike McQuaid
1474806527
Add more HOMEBREW_FORBIDDEN_* configuration
We already had `HOMEBREW_FORBIDDEN_LICENSES` but this commit adds
`HOMEBREW_FORBIDDEN_CASKS`, `HOMEBREW_FORBIDDEN_FORMULAE` and
`HOMEBREW_FORBIDDEN_TAPS` for also forbidding those.

Relatedly, add `HOMEBREW_FORBIDDEN_OWNER` and
`HOMEBREW_FORBIDDEN_OWNER_CONTACT` to allow customising these
messages.

There were no existing tests for `HOMEBREW_FORBIDDEN_LICENSES` so have
added more tests for all of these checks.

Co-authored-by: Bo Anderson <mail@boanderson.me>
2024-04-08 16:38:32 +01:00
Douglas Eichelberger
db9c5a5da1 Fix linux test 2024-03-20 10:36:19 -07:00
Markus Reiter
a851bb86ef
Add type signature for Tap::fetch. 2024-03-06 14:30:17 +01:00
Douglas Eichelberger
26eda5a303
git grep -l '^describe' | xargs gsed -i 's|^describe|RSpec.describe|g' 2024-02-19 13:57:27 +00:00
Douglas Eichelberger
2255b9d43d
Enable verify_partial_doubles 2024-02-19 13:57:27 +00:00
Douglas Eichelberger
36f64d6b30 Enable Style/TopLevelMethodDefinition 2024-01-26 11:37:11 -08:00
Bo Anderson
5692c8ecbf
Fix style violations under newer RuboCop 2023-12-14 05:47:12 +00:00
Bo Anderson
af7d744af0
Fixes for Ruby 3 2023-09-29 05:25:48 +01:00
Eric Knibbe
931f762598
docs+rubydoc: various grammar/wording fixes 2023-09-11 02:26:37 -04:00
Markus Reiter
486c3765ce
Add --os=all and --arch=all options. 2023-05-17 15:26:46 +02:00
Markus Reiter
a3231a03fa
Implement cask renames. 2023-05-12 21:17:30 +02:00
Douglas Eichelberger
9075cbae62 brew style --fix 2023-04-21 09:58:50 -07:00
Douglas Eichelberger
ac1e6ded9a git grep -l '# typed: false' | xargs gsed -i 's|# typed: false||g' 2023-04-21 09:57:47 -07:00
Issy Long
3a83b5492c
rubocop: Clean up Style/BlockDelimiters excludes and autofix offenses
- The defaults of using "do ... end" for multi-line blocks everywhere is
  good, better than switching everything to braces everywhere.
2023-03-08 23:54:22 +00:00
EricFromCanada
dfc9906184
internal messaging fixes 2023-02-10 23:17:16 -05:00
apainintheneck
ad57705029 All --cask for linux dev cmds
This ability was removed around a month
ago but needs to be added back in.

Developers want to be able to use the
`bump` and `audit` commands when on Linux.
This is especially useful for CI.
2023-01-08 17:34:52 -08:00
apainintheneck
d8c2e311ab Use odie instead of bare exception
The reason that odie works well here
is that it doesn't print a stacktrace
or get caught and print the help page.
2023-01-02 10:59:08 -08:00
apainintheneck
a8384c0ce7 cli/parser: Better error message for cask on linux
1. Validate options before constraint violations. This allows
us to error out when --cask is passed on Linux before getting
a constraint violation when --cask and --formula are set.
2. Skip printing the help page when --cask is passed on Linux.
2022-12-31 12:34:18 -08:00
apainintheneck
35500130c4 Update parser tests
- Remove named_args linux specs now that that
  logic has been moved to the parser
2022-12-04 23:02:44 -08:00
apainintheneck
b7e28ef48f Make :formula? the default on Linux
This makes :formula? the default whenever
defined throughout the codebase on Linux.
It also makes :cask? illegal for all Linux
users.
2022-12-04 19:43:12 -08:00
apainintheneck
a178fc6a88 Cleanup no cask on linux specs 2022-10-02 08:51:17 -07:00
apainintheneck
5d27b70757 Set --formula by default on linux 2022-10-01 17:28:07 -07:00
apainintheneck
020c50e588 Warn linux users about using --cask 2022-10-01 16:11:39 -07:00
apainintheneck
1d5c668110 Remove unused parser option required_for 2022-06-08 15:23:58 -07:00
Issy Long
6b76fd012a
Fix (auto-correct) RuboCop RSpec/BeNil offenses 2022-03-01 00:10:10 +00:00
Bo Anderson
c49dc6803b
exceptions: set backtrace for FormulaUnreadableError 2021-09-17 00:06:42 +01:00
FnControlOption
326321c1fd cli/parser: allow commands that look like options 2021-08-25 14:34:57 -07:00
Connor Mann
ed7066c183
Style fix 2021-08-06 22:35:16 -04:00
Connor Mann
1581a29b28
Update tests 2021-08-06 22:34:30 -04:00
Connor Mann
3dde12c634
Handle only HEAD kegs in to_latest_kegs 2021-08-04 18:51:39 -04:00
Rylan Polster
08b44afcdf
cli/parser: allow options to be hidden 2021-06-08 22:02:32 -04:00
Connor Mann
d50b32313f Fix to_kegs test 2021-05-24 09:17:52 -04:00
Connor Mann
b81a522230 Add tests for to_latest_kegs 2021-05-23 16:09:35 -04:00
Connor Mann
c18c931224 Fix tests 2021-05-21 11:52:17 -04:00
Connor Mann
0938500721
Update Library/Homebrew/test/cli/named_args_spec.rb
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
2021-05-20 12:09:45 -04:00
Connor Mann
cad665406e Update to_kegs tests 2021-05-20 12:08:10 -04:00
Connor Mann
2938b2798d Update to_default_kegs tests 2021-05-20 12:06:23 -04:00
Connor Mann
08bbb95cfb Add to_kegs test 2021-05-19 13:58:55 -04:00
Connor Mann
49aa057188 Rename resolve_keg to resolve_default_keg 2021-05-19 10:29:40 -04:00
Connor Mann
fe9a9bb24c Rename to_keg to to_default_kegs 2021-05-19 09:34:18 -04:00
Connor Mann
d754c0f450 Update tests for to_keg 2021-05-18 09:57:57 -04:00
John Bampton
1691e615fe Fix spelling 2021-05-08 11:20:01 +10:00
Bo Anderson
8e98ce69f3
Stricter handling of CLI args 2021-03-18 16:41:57 +00:00
Mike McQuaid
d6957a3acb
Homebrew 3.0.0 deprecations/disables 2021-01-29 19:50:24 +00:00
Seeker
1ce8bd00fb named_args: print error if formula and cask found but one is unreadable 2021-01-28 15:21:23 -08:00