警告:在 macOS 上使用 Brew 调用 `sha256 “digest”

Raf*_*mes 4 macos terminal homebrew

自从我上次brew update在 macOS 中运行该命令以来,我开始在下面遇到此问题。跑步brew style --fix并不能解决问题。

我怎么能解决呢?

macOS brew 错误 sha256

Warning: Calling `sha256 "digest" => :tag` in a bottle block is deprecated! Use `brew style --fix` on the formula to update the style or use `sha256 tag: "digest"` instead.
Please report this issue to the henkrehorst/bc tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/henkrehorst/homebrew-bc/Formula/apr-util-bc.rb:10

Warning: Calling `sha256 "digest" => :tag` in a bottle block is deprecated! Use `brew style --fix` on the formula to update the style or use `sha256 tag: "digest"` instead.
Please report this issue to the henkrehorst/bc tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/henkrehorst/homebrew-bc/Formula/apr-util-bc.rb:11

Warning: Calling `sha256 "digest" => :tag` in a bottle block is deprecated! Use `brew style --fix` on the formula to update the style or use `sha256 tag: "digest"` instead.
Please report this issue to the henkrehorst/bc tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/henkrehorst/homebrew-bc/Formula/apr-util-bc.rb:12

Warning: Calling `sha256 "digest" => :tag` in a bottle block is deprecated! Use `brew style --fix` on the formula to update the style or use `sha256 tag: "digest"` instead.
Please report this issue to the henkrehorst/bc tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/henkrehorst/homebrew-bc/Formula/openssl-bc.rb:15

Warning: Calling `sha256 "digest" => :tag` in a bottle block is deprecated! Use `brew style --fix` on the formula to update the style or use `sha256 tag: "digest"` instead.
Please report this issue to the henkrehorst/bc tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/henkrehorst/homebrew-bc/Formula/openssl-bc.rb:16

Warning: Calling `sha256 "digest" => :tag` in a bottle block is deprecated! Use `brew style --fix` on the formula to update the style or use `sha256 tag: "digest"` instead.
Please report this issue to the henkrehorst/bc tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/henkrehorst/homebrew-bc/Formula/openssl-bc.rb:17
Run Code Online (Sandbox Code Playgroud)

Raf*_*mes 5

您需要指定公式的路径来修复它,请尝试在下面运行此命令。

brew style --fix /usr/local/Homebrew/Library/Taps/henkrehorst/homebrew-bc/Formula
Run Code Online (Sandbox Code Playgroud)

例子

$ brew style --fix /usr/local/Homebrew/Library/Taps/pnbv/homebrew-ffmpegvidstab/ffmpeg.rb
Fetching gem metadata from https://rubygems.org/.........
Using ...
Fetching ...
Installing ...
Bundle complete! 31 Gemfile dependencies, 84 gems now installed.
Bundled gems are installed into `../../usr/local/Homebrew/Library/Homebrew/vendor/bundle`
Removing ...
 /usr/local/Homebrew/Library/Taps/pnbv/homebrew-ffmpegvidstab/ffmpeg.rb:9:5: C: [Corrected] sha256 should use new syntax
    sha256 "468153bac4b90b445fa5c6adfb70ec3213ebc0f63c7a97a6b2a1649d9c32a786" => :mojave
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
1 file inspected, 21 offenses detected, 21 offenses corrected
Run Code Online (Sandbox Code Playgroud)