Homebrew 声称它已经过时了,除非我尝试更新

Homebrew 声称它已经过时了,除非我尝试更新

当我运行时,brew doctor系统提示我 brew 安装已过时。具体来说:

~$ brew doctor
Error: Your Homebrew is outdated
You haven't updated for at least 24 hours, this is a long time in brewland!

但是当我运行更新时,显然一切都很好:

~$: brew update
Already up-to-date.

所以,我想一切都很好?但事实并非如此。brew doctor仍然告诉我我的 Homebrew 已过时。发生了什么?

答案1

一切都很好。只是沟通方式不好。

Homebrewdoctor源显然仅检查时间戳你的 Homebrew 存储库克隆:

if Time.now.to_i - timestamp > 60 * 60 * 24 then <<-EOS.undent
  Your Homebrew is outdated
  You haven't updated for at least 24 hours, this is a long time in brewland!
  EOS
end

它根本不知道您何时真正更新,或者是否有可用的新版本。

相关内容