This got updated recently in 42a42c96acc5193dbb6e321ff2aaecceb00e48a4
to split out the livecheck audits and as a result of that the type
signature for the #validate_url_for_https_availablity method got updated.
This did not account for the possibility that the livecheck url was nil.
I've added a nil check here since it makes no sense to try and validate
a nil url and we have nil checks for the other two http availability
audits already. Plus, the livecheck blocks are audited thoroughly already
for syntax.
At the moment, Microsoft Office and related casks fail audit due to
failure to fetch a product homepage from the main Microsoft site
(https://www.microsoft.com/) served by Akamai CDN.
The failure is severe and weird: no status code is received as the
connection is reset.
The analysis revealed the issue is linked to `User-Agent` and
`Accept-Language` headers parsing. Homebrew uses involved user agent
strings and has language hardcoded as `en`.
The simplest workaround is to use a simple user agent string when checking
homepage availability if the cask is in an audit exceptions list.
Merging this would fix Microsoft Office updates (including
https://github.com/Homebrew/homebrew-cask/pull/162671)
This was not returning the full name correctly for e.g. anything in
Homebrew/homebrew-fonts.
While we're here, fix up a few other places where `tap.core_cask_tap?`
can be used more appropriately.
This change doesn't affect the behavior of the `#audit_min_os`
method and simply reorders the array members to place `plist_min_os`
before `sparkle_min_os` for the sake of consistency (using the same
order as the preceding lines).
The `#livecheck_min_os` cask audit method manually replicates some of
the `Sparkle` strategy's behavior but in an incomplete way that has
lead to inappropriate audit failures at times. This reimplements it
to use `Livecheck` methods, so it will align with the `Sparkle`
strategy's behavior.
The `#livecheck_min_os` cask audit method should be skipped when a
`Sparkle` `livecheck` block contains a `strategy` block that uses
the `items` argument (instead of `item`). These `strategy` blocks
contain arbitrary logic that ignores/overrides the strategy's sorting,
so we can't identify which item would be first/newest.
Ever since we started using this at runtime it's been polluting
the backtrace output. This makes it harder to debug errors and
increases the amount of info users have to paste into the box
when filing an issue.
This is a very direct approach. Essentially, we strip out
everything related to the `sorbet-runtime` gem whenever the top
line in the backtrace is unrelated to sorbet-runtime.
The hope is that this will allow errors related to sorbet to
be diagnosed easily while also reducing the backtrace size
for all other types of errors.
Sometimes it is useful to see the full backtrace though.
For those cases, we include the full backtrace when
`--verbose` is passed in and print a warning that the
Sorbet lines have been removed from the backtrace the
first time they are removed.
Note: This requires gems to be set up so that the call to
`Gem.paths.home` works correctly. For that reason, it must
be included after `utils/gems` which is included in
`standalone/load_path` already.
- check for cask.url in audit steps
- check for cask.version in audit steps
- check for cask.sha256 in fetch command
- stop omitting casks based on nil url in audit command
It would be nice to be able to omit casks from the audit
if the os is not supported but there is not easy way to
do that without updating the SimulateSystem code or
refactoring how MacOSRequirement's are defined in the DSL.
- Load paths with no API when needed (e.g. for `brew edit`)
- Use no API mode for `brew log` as it's needed there
- Define sharding format for homebrew-cask and homebrew-core inside
`Tap` methods
- Create new formulae/casks in location defined by these `Tap` methods
- Fix a bug in Formulary that made sharded formulae lookup less
efficient (and possibly broke it for core and some API usage)
- Fix various other hardcoded Formula/Cask directory assumptions
Co-authored-by: Bo Anderson <mail@boanderson.me>
- Specify `strictish: true` in `add_error` to specify that it's not a
super big critical error.
- These will be shown only if `brew audit --strict` is requested.
- Ignore them and don't show them otherwise.
- Part three of issue 15074:
> As a result, I propose that all current cask audit warnings are never
> displayed as warnings but the underlying audit checks turned into
> errors displayed only with --strict (or one of the other relevant
> flags).