Bo Anderson
5921aef55c
Fix DownloadError erroring itself
2023-05-02 02:09:53 +01:00
Mike McQuaid
cdc54636ee
Merge pull request #15344 from samford/download-strategy-replace-in-place-sub
...
BazaarDownloadStrategy: Replace in-place sub
2023-05-01 18:05:54 +01:00
Ruoyu Zhong
5d9c3d0432
cmd/update-report: do not fail when tap has no origin
...
This fixes the following error:
$ brew update
Warning: No remote 'origin' in /usr/local/Homebrew/Library/Taps/foo/homebrew-bar, skipping update!
Error: HOMEBREW_UPDATE_BEFORE_FOO_HOMEBREW_BAR is unset!
/usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:361:in `initialize'
/usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:187:in `new'
/usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:187:in `block in output_update_report'
/usr/local/Homebrew/Library/Homebrew/tap.rb:748:in `block (2 levels) in each'
/usr/local/Homebrew/Library/Homebrew/tap.rb:747:in `each'
/usr/local/Homebrew/Library/Homebrew/tap.rb:747:in `block in each'
/usr/local/Homebrew/Library/Homebrew/tap.rb:746:in `each'
/usr/local/Homebrew/Library/Homebrew/tap.rb:746:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:160:in `output_update_report'
/usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:40:in `update_report'
/usr/local/Homebrew/Library/Homebrew/brew.rb:94:in `<main>'
Already up-to-date.
Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2023-05-01 23:37:01 +08:00
Sam Ford
ec2a7121ab
BazaarDownloadStrategy: Replace in-place sub
...
livecheck's `Git` strategy uses `DownloadStrategyDetector#detect`
in its `#match?` method to check if a URL is a Git repository. This
has historically worked fine but I've recently seen a `can't modify
frozen String` error for a few formulae (percona-toolkit,
schroedinger, squid) in relation to the in-place `sub` call in
`BazaarDownloadStrategy`'s initializer.
Other download strategies use a `@url = @url.sub(...)` pattern to
avoid this issue, so this commit resolves the issue by using the same
approach in `BazaarDownloadStrategy`.
2023-05-01 10:45:13 -04:00
Issy Long
01e0c20d01
Merge pull request #15341 from issyl0/brew-doctor-unnecessary-core-taps
...
diagnostic: Check for unnecessary Core and Cask taps
4.0.16
2023-04-30 19:25:00 +01:00
Issy Long
a1da2bde3d
Appease brew style
2023-04-30 19:09:41 +01:00
Issy Long
e739a5c076
"A few small nits" from code review
...
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-04-30 19:06:07 +01:00
JBYoshi
4935a8fbb2
Remove unreachable warning.
2023-04-30 12:29:40 -05:00
Issy Long
40f697e96e
diagnostic: Check for unnecessary Core and Cask taps
...
- If the user doesn't have `HOMEBREW_DEVELOPER` or
`HOMEBREW_NO_INSTALL_FROM_API` set but does have `homebrew/core` or
`homebrew/cask` taps installed this can cause problems with installing
outdated software.
- Hence, warn them in `brew doctor` if they have either of these taps
installed, with instructions on how to remove them.
2023-04-30 15:25:56 +01:00
Mike McQuaid
e6d84f43d2
Merge pull request #15337 from ZhongRuoyu/service-block-opt-paths
...
rubocops/service: check for more cellar paths
2023-04-30 09:58:50 +01:00
Ruoyu Zhong
254941c6f7
rubocops/service: check for more cellar paths
...
This is a follow-up to #15154 . In addition to `bin`, the `service` block
can also reference other cellar paths like `libexec`. They don't work
with the API either, as reported in
https://github.com/orgs/Homebrew/discussions/4459 .
Violations are already corrected in Homebrew/homebrew-core#129736
and Homebrew/homebrew-core#129737 .
Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2023-04-30 07:39:25 +08:00
Mike McQuaid
0c478b36df
Merge pull request #15334 from samford/livecheck/sorbet-runtime-fixes
...
Livecheck: Fixes for Sorbet runtime
2023-04-29 15:55:06 +01:00
Sam Ford
a2e966c186
Xml: Move require outside of #parse_xml
...
Since we use `REXML::Document` in the type signature for `#parse_xml`,
we can encounter an `uninitialized constant
Homebrew::Livecheck::Strategy::Xml::REXML` error in strategies like
`Sparkle` that use `Xml#parse_xml` internally when the Sorbet runtime
is used. Moving the related require outside of the `#parse_xml` method
and into the `Xml` strategy proper resolves this issue.
2023-04-29 10:16:47 -04:00
Sam Ford
6597ee6fd3
Sparkle: Account for nil content value
...
`content` can be `nil` when a request doesn't succeed but
`#versions_from_content` expects a `String` value, so we need to
guard against a `nil` value like we do in other strategies.
2023-04-29 10:16:47 -04:00
Sam Ford
1c03018b6a
Launchpad: Use DEFAULT_REGEX as default regex arg
...
Using `DEFAULT_REGEX` as the default value of the `#find_versions`
`regex` parameter allows us to tighten the type.
2023-04-29 10:16:46 -04:00
Sam Ford
a28e1aa422
livecheck: Selectively pass args to #find_versions
...
The existing way of passing values to `#find_versions` methods in
strategies leads to type issues when the Sorbet runtime is enabled.
We've also recently talked about moving away from nilable args when
we can specify a default value but this doesn't work if we pass in a
`nil` value (like we're currently doing).
This commit aims to address both of those areas by better controlling
which arguments we're passing to `#find_versions`. This approach
naively handles `cask`/`url` arguments by special-casing
`ExtractPlist`.
However, we should be checking the strategy's `#find_versions`
method for a `cask` or `url` keyword parameter. The issue is that
`strategy.method(:find_versions).parameters` is returning
`[[:rest, :args], [:block, :blk]]` instead of the actual parameters
like `[[:keyreq, :url], [:key, :regex], [:keyrest, :unused],
[:block, :block]]`.
2023-04-29 10:16:45 -04:00
Mike McQuaid
cd683aefa8
Merge pull request #14629 from Kentzo/sudo-user
...
sudo: explicitly specify the root user where necessary
2023-04-29 11:17:21 +01:00
Markus Reiter
e666dd6b4f
Merge pull request #15332 from reitermarkus/typecheck-nested-url
...
Fix type for nested `url` blocks.
2023-04-29 12:13:06 +02:00
Mike McQuaid
5a4c3ccde7
Merge pull request #15331 from Homebrew/sorbet-files-update
...
sorbet: Update RBI files.
2023-04-29 11:12:26 +01:00
Mike McQuaid
ca155cba39
Merge pull request #15330 from Homebrew/dependabot/bundler/Library/Homebrew/zeitwerk-2.6.8
...
build(deps): bump zeitwerk from 2.6.7 to 2.6.8 in /Library/Homebrew
2023-04-29 11:11:58 +01:00
Mike McQuaid
4789d18c7c
Merge pull request #15328 from Kentzo/timeout-typo
...
download_strategy: Fix the timeout value.
2023-04-29 11:11:41 +01:00
Carlo Cabrera
aec05e6b19
Merge pull request #15333 from carlocab/test-runner-debug
...
determine-test-runners: add debug output
2023-04-29 11:52:27 +08:00
Carlo Cabrera
f3724f00d2
determine-test-runners: fix test
2023-04-29 11:36:31 +08:00
Carlo Cabrera
50df7fab28
determine-test-runners: add debug output
...
The extra timeout on Intel Big Sur doesn't seem to be set, so I'm adding
this so I can have a closer look.
2023-04-29 11:03:27 +08:00
Markus Reiter
af1961d509
Fix type for nested url
blocks.
2023-04-29 03:33:59 +02:00
BrewTestBot
e3baa09a14
sorbet: Update RBI files.
...
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml ) workflow.
2023-04-29 00:24:09 +00:00
BrewTestBot
811d755e7f
Update RBI files for zeitwerk.
...
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml ) workflow.
2023-04-28 19:06:59 +00:00
BrewTestBot
f47fc81dd9
brew vendor-gems: commit updates.
2023-04-28 19:02:30 +00:00
dependabot[bot]
2e947b9c35
build(deps): bump zeitwerk from 2.6.7 to 2.6.8 in /Library/Homebrew
...
Bumps [zeitwerk](https://github.com/fxn/zeitwerk ) from 2.6.7 to 2.6.8.
- [Release notes](https://github.com/fxn/zeitwerk/releases )
- [Changelog](https://github.com/fxn/zeitwerk/blob/main/CHANGELOG.md )
- [Commits](https://github.com/fxn/zeitwerk/compare/v2.6.7...v2.6.8 )
---
updated-dependencies:
- dependency-name: zeitwerk
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-04-28 18:59:56 +00:00
Ilya Kulakov
6a4322833f
sudo: Fix tests.
2023-04-28 11:22:54 -07:00
Ilya Kulakov
476d97934f
sudo: change sudo_user to sudo_as_root.
2023-04-28 11:22:54 -07:00
Ilya Kulakov
d470661b37
sudo: add the sudo_user arg to SystemCommand.
2023-04-28 11:11:53 -07:00
Ilya Kulakov
563387a7b4
sudo: explicitly specify the root user where necessary
...
With sudoers one may override default sudo user. This mostly works
provided the admin configured the replacement appropriately. However
there are exceptions that absolutely must be run by root such as
/usr/sbin/installer and, under certain circumstances, /bin/launchctl.
2023-04-28 11:11:53 -07:00
Ilya Kulakov
a63ccfa8ff
download_strategy: Fix the timeout value.
2023-04-28 10:11:24 -07:00
Mike McQuaid
e191b827cc
Merge pull request #15257 from Bo98/download-refactor
...
Refactor formula, cask and Ruby source downloads to use shared code
2023-04-28 08:30:51 +01:00
Bo Anderson
44f058edb5
Refactor formula, cask and Ruby source downloads to use shared code
2023-04-27 23:23:07 +01:00
Mike McQuaid
7386d4e407
Merge pull request #15316 from Homebrew/dependabot/bundler/Library/Homebrew/i18n-1.13.0
...
build(deps): bump i18n from 1.12.0 to 1.13.0 in /Library/Homebrew
2023-04-27 17:57:19 +01:00
BrewTestBot
45308ed3eb
Update RBI files for i18n.
...
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml ) workflow.
2023-04-27 16:41:43 +00:00
BrewTestBot
a8f023f8bb
brew vendor-gems: commit updates.
2023-04-27 16:37:05 +00:00
dependabot[bot]
7945f0c123
build(deps): bump i18n from 1.12.0 to 1.13.0 in /Library/Homebrew
...
Bumps [i18n](https://github.com/ruby-i18n/i18n ) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/ruby-i18n/i18n/releases )
- [Changelog](https://github.com/ruby-i18n/i18n/blob/master/CHANGELOG.md )
- [Commits](https://github.com/ruby-i18n/i18n/compare/v1.12.0...v1.13.0 )
---
updated-dependencies:
- dependency-name: i18n
dependency-type: indirect
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-04-27 16:34:24 +00:00
Mike McQuaid
e06b2fd3f8
Merge pull request #15325 from woodruffw-forks/ww/more-normalize
...
pypi: normalize name in `pypi_info`
2023-04-27 17:31:27 +01:00
William Woodruff
ea6423094b
pypi: normalize name in pypi_info
...
Signed-off-by: William Woodruff <william@yossarian.net>
2023-04-27 10:14:17 -06:00
JBYoshi
84fe93e5d7
Remove successor behavior for zapping.
2023-04-27 10:40:45 -05:00
Mike McQuaid
f543b6f53e
Merge pull request #15323 from Homebrew/sorbet-files-update
...
sorbet: Update RBI files.
2023-04-27 16:30:59 +01:00
Douglas Eichelberger
6bc94abadc
Remove delegation of ReporterHub#empty?
2023-04-27 08:13:51 -07:00
Mike McQuaid
50a699315f
Merge pull request #15324 from Bo98/codecov-file-fix
...
workflows/tests: fix Codecov root dir
2023-04-27 15:12:01 +01:00
Bo Anderson
b5f4e8e790
workflows/tests: fix Codecov root dir
2023-04-27 14:59:18 +01:00
Mike McQuaid
9d5b017bb9
Merge pull request #15322 from carlocab/rm-linux-cleanup
...
github_runner_matrix: remove `HOMEBREW_LINUX_CLEANUP`
2023-04-27 12:28:45 +01:00
BrewTestBot
93f8627a58
sorbet: Update RBI files.
...
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml ) workflow.
2023-04-27 11:14:15 +00:00
Carlo Cabrera
ff728da97b
github_runner_matrix: remove HOMEBREW_LINUX_CLEANUP
...
This will allow us to remove handling of this in our workflow files in
Homebrew/core.
2023-04-27 16:45:51 +08:00