4584 Commits

Author SHA1 Message Date
Bo Anderson
3e75b165ae
utils/github: rewrite get_workflow_run using GraphQL 2022-04-11 20:35:03 +01:00
Issy Long
0b6b2f04da
cask/reinstall: Support --zap for entirely purging cask files
- The `brew uninstall` command has `--zap`, so let's make `brew
  reinstall` have parity here for a better user experience. (Requested
  in issue 12983.)
- It feels weird that to get my new reinstall test to pass I had to add
  `--zap` to `cask/cmd/install.rb`, not `cask/cmd/reinstall.rb` to get
  the tests to pass. But the `brew reinstall --cask caffeine --zap`
  command worked fine all the time. The CLI argument parser from the
  test run was complaining about not knowing what `zap` was. As a
  result, `--zap` now shows up as a switch in `brew install --help`
  which I'm not 100% convinced is the desired UX. But I've edited the
  description accordingly to specify that it will only work on
  `reinstall` operations (and `--zap` on `install` is a no-op).

```
issyl0 at pictor in /opt/homebrew on reinstall-cask-zap
❯ brew reinstall --cask caffeine --zap
==> Downloading https://github.com/IntelliScape/caffeine/releases/download/1.1.3/Caffeine.dmg
Already downloaded: /Users/issyl0/Library/Caches/Homebrew/downloads/3d6ccfdd3b8d0ab37d1c2468d6e69078c2d31d3b12bf51947c4db21e5f376af2--Caffeine.dmg
==> Implied `brew uninstall --cask caffeine`
==> Backing App 'Caffeine.app' up to '/opt/homebrew/Caskroom/caffeine/1.1.3/Caffeine.app'
==> Removing App '/Applications/Caffeine.app'
==> Dispatching zap stanza
==> Trashing files:
~/Library/Application Support/com.intelliscapesolutions.caffeine
~/Library/Preferences/com.intelliscapesolutions.caffeine.plist
~/Library/Caches/com.intelliscapesolutions.caffeine
~/Library/HTTPStoages/com.intelliscapesolutions.caffeine.binarycookies
==> Removing all staged versions of Cask 'caffeine'
==> Installing Cask caffeine
==> Moving App 'Caffeine.app' to '/Applications/Caffeine.app'
🍺  caffeine was successfully installed!
```
2022-04-09 16:37:23 +01:00
Sean Molenaar
d62558aa68
Merge pull request #12692 from SMillerDev/feature/pr-pull/casks
pr-pull: allow casks to be pulled
2022-04-04 16:02:51 +02:00
EricFromCanada
2fdc70c3bf
desc, search: also search cask descriptions 2022-03-30 11:23:55 -04:00
Sean Molenaar
54e15cf361
pr-pull: allow pulling casks 2022-03-30 10:27:17 +02:00
Bo Anderson
ebda92f908
Revert "Binary patching of build prefixes " 2022-03-21 18:22:36 +00:00
Daniel Nachun
058be73b72
Merge pull request #12940 from danielnachun/patch_prefix2
Binary patching of build prefixes
2022-03-21 10:44:22 -07:00
Bo Anderson
fbc5b11a2d
Merge pull request #12988 from apainintheneck/add_keep_alive
Added Service#keep_alive? method
2022-03-14 04:20:41 +00:00
danielnachun
843a189d40
test/keg_relocate/binary_relocation_spec.rb: add new unit test 2022-03-12 17:46:09 -08:00
apainintheneck
62de156c40 Added Service#keep_alive? method 2022-03-11 12:42:41 -08:00
danielnachun
2c4ad58d16
test/software_spec/bottle_spec.rb: add unit tests 2022-03-10 11:32:32 -08:00
Daniel Nachun
d2857e0dd8
Merge pull request #12964 from danielnachun/new_binary_grep
Use simpler method to detect binaries
2022-03-09 16:39:21 -08:00
danielnachun
1faa4448bd
test/keg_relocate/grep_spec.rb: update unit test 2022-03-09 13:33:50 -08:00
Mike McQuaid
0bd1e6a24d
Merge pull request #12966 from Bo98/svn-test-fix
test/os/mac/dependency_collector_spec: fix svn test on older macOS
2022-03-07 08:54:33 +00:00
Bo Anderson
4db0b9963c
test/spec_helper: prevent stdin trashing 2022-03-06 19:06:28 +00:00
Bo Anderson
a2f95125f0
test/os/mac/dependency_collector_spec: fix svn test on older macOS 2022-03-06 19:04:04 +00:00
Bo Anderson
e4159a7986
dev-cmd/pr-pull: consider alternative tap formula directories
Fixes #12939.
2022-03-01 16:39:09 +00:00
Mike McQuaid
c84cb39d04
Merge pull request #12937 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-rspec-2.9.0
build(deps): bump rubocop-rspec from 2.8.0 to 2.9.0 in /Library/Homebrew
2022-03-01 10:03:13 +00:00
Issy Long
cb2a09e65e
Fix (auto-correct) more RSpec/BeNil offenses
- The `RSpec/BeEq` auto-corrections made more `RSpec/BeNil` offenses, so another go of `brew style --only=RSpec/BeNil --fix\` is needed.
2022-03-01 00:36:37 +00:00
Issy Long
72e48024f0
Fix (auto-correct) RuboCop Rspec/BeEq offenses 2022-03-01 00:10:14 +00:00
Issy Long
6b76fd012a
Fix (auto-correct) RuboCop RSpec/BeNil offenses 2022-03-01 00:10:10 +00:00
Daniel Nachun
76e4f6bc79
Merge pull request #12890 from danielnachun/add_binary_grep
Add binary grep method to keg_relocate
2022-02-28 11:27:09 -08:00
danielnachun
dd898e58b8
test/keg_relocate/grep_spec.rb: add new unit tests 2022-02-28 08:59:33 -08:00
Mike McQuaid
d48a9337e4
Revert "update-report: default HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED to on." 2022-02-28 09:54:12 +00:00
Mike McQuaid
16bdd42308
cask/dsl/version_spec: remove deprecated specs.
No idea why these didn't fail before now?
2022-02-25 15:26:37 +00:00
Mike McQuaid
7ec6d41a1d
Revert "formula: remove OnOS." 2022-02-24 12:31:32 +00:00
Mike McQuaid
dd8a245158
Merge pull request #12910 from Homebrew/update_report_only_installed_default
update-report: default HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED to on.
2022-02-24 08:46:08 +00:00
Mike McQuaid
73951a01fc
formula: remove OnOS. 2022-02-22 10:19:09 +00:00
Mike McQuaid
10d5266361
update-report: default HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED to on.
This avoids reading formula files that the user hasn't explicitly
installed which both speeds up `brew update` and improves the security.
2022-02-22 10:01:24 +00:00
Mike McQuaid
249bc2136a
Merge pull request #12837 from NickHackman/service-launch-only-once
service: launch only once
2022-02-14 09:17:44 +00:00
NickHackman
53d37cc84c service(systemd): launch_only_once test 2022-02-12 17:26:21 -05:00
NickHackman
9f4949c8c6 service: LaunchOnlyOnce plist test 2022-02-11 14:46:47 -06:00
Rylan Polster
e5e4c288be
Cleanup brew style --fix suggestions 2022-02-11 10:45:51 -05:00
Josh Soref
37fd64b5a3 formula_auditor: new formulas should not define a revision
Logically new formulas should start at revision 0, but a
developer might use an existing formula as a template and
otherwise not realize they should remove this field.

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-02-09 13:14:10 -05:00
Niklas Higi
00f209e16e
Recommend interactive usage of fish_add_path
Since the `fish_add_path` command modifies a universal Fish variable
(which is automatically persisted to a file) it's unnecessary to run it
again every time a new shell is opened.
2022-02-05 16:29:09 +01:00
Carlo Cabrera
2b60a99d4a
Revert "shebang: raise error if no rewriting"
This is causing failures when attempting to rewrite shebangs during the
cleanup stage of `brew install`.

See, for example, Homebrew/homebrew-core#94323,
Homebrew/homebrew-core#94321.

This reverts commit 7e6be5eb4474ed9eaa4b8e9a5a45e3340186840c.
2022-02-02 20:44:03 +08:00
Carlo Cabrera
f05e57f414
Merge pull request #12823 from carlocab/setuptools-audit
rubocops/text: remove `setuptools` audit
2022-02-01 16:57:57 +08:00
Mike McQuaid
955292d666
Merge pull request #12820 from branchvincent/shebang
shebang: raise error if no rewriting
2022-02-01 08:37:34 +00:00
Carlo Cabrera
bc67c05528
rubocops/text: remove setuptools audit
This currently no longer applies, because we might sometimes need an
older `setuptools` than the one shipped with a Python formula.

This is needed for Homebrew/homebrew-core#93964.
2022-02-01 15:26:50 +08:00
Branch Vincent
7e6be5eb44
shebang: raise error if no rewriting 2022-02-01 00:17:50 -05:00
Roland Crosby
d8df9c2ee9 Allow cargo build --lib
When building Rust packages that provide libraries but no executable
binaries, `cargo install` doesn't do anything; you need to use `cargo
build` and install any libraries manually. See e.g.
rust-lang/cargo#8294.

Unfortunately, Homebrew's Rubocop "use cargo install *std_cargo_args"
rule, as currently written, blocks all invocations of `cargo build`.
This commit changes that rule to exclude invocations of `cargo build`
that use the `--lib` argument (`--lib` specifies to Cargo that a
package's library targets should be built). This will enable library
packages to be built while retaining the "use cargo install
*std_cargo_args" message for the more common case when a Rust package
provides executable binaries.
2022-01-31 21:11:22 -05:00
Mike McQuaid
0b9df6db62
test/cmd/services_spec: fix test.
Was broken by https://github.com/Homebrew/homebrew-services/pull/443
2022-01-21 13:52:22 +00:00
Adrian Ho
af4955adfc dev-cmd/bottle: clean up intermediate tar
Otherwise Cellar gets cluttered.

Fixes https://github.com/Homebrew/brew/issues/12744.
2022-01-18 15:58:35 +08:00
Mike McQuaid
3ba6afb1d3
Merge pull request #12648 from bevanjkay/cask-comma-separator-style
rubocops (cask/url): add rubocop to use csv instead of before|after_comma
2022-01-12 13:48:54 +00:00
Bevan Kay
d371547d5a
fix tests 2022-01-12 10:39:38 +11:00
Bevan Kay
6f62b0e029
add tests 2022-01-11 13:18:06 +11:00
Rylan Polster
feb93167ad
Rename and fix Formatter:wrap to Formatter.format_help_text 2022-01-08 23:13:08 -05:00
Mike McQuaid
b09f421027
repology: always use Homebrew curl.
This seems to be required even with TLSv1.3 support now.

Also, while we're here, improve the error handling/output.
2022-01-03 13:17:12 +00:00
Bevan Kay
d5448ff54a
rubocops (cask/url): add rubocop to use csv instead of before_comma and after_comma in cask 2021-12-31 11:08:47 +11:00
Mike McQuaid
36e9e45c54
Merge pull request #12643 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-performance-1.13.0
build(deps): bump rubocop-performance from 1.12.0 to 1.13.0 in /Library/Homebrew
2021-12-29 13:33:04 +00:00