Skip to content
GitLab
菜单
项目
群组
代码片段
/
帮助
帮助
支持
社区论坛
快捷键
?
提交反馈
登录/注册
切换导航
菜单
打开侧边栏
KMSCAKKSCFKA AKFACAMADCAS
brew
提交
d1aac885
提交
d1aac885
编辑于
11月 24, 2021
作者:
XuehaiPan
浏览文件
tests/utils/git_spec: update tests for `ensure_formula_installed!`
上级
9ef52080
变更
2
Hide whitespace changes
Inline
Side-by-side
Library/Homebrew/test/utils/git_spec.rb
浏览文件 @
d1aac885
...
...
@@ -184,7 +184,7 @@ describe Utils::Git do
unless
ENV
[
"HOMEBREW_TEST_GENERIC_OS"
]
it
"installs git"
do
expect
(
described_class
).
to
receive
(
:available?
).
and_return
(
false
)
expect
(
described_class
).
to
receive
(
:
safe_system
).
with
(
HOMEBREW_BREW_FILE
,
"install"
,
"git"
).
and_return
(
true
)
expect
(
described_class
).
to
receive
(
:
ensure_formula_installed!
).
with
(
"git"
)
expect
(
described_class
).
to
receive
(
:available?
).
and_return
(
true
)
described_class
.
ensure_installed!
...
...
Library/Homebrew/utils/git.rb
浏览文件 @
d1aac885
...
...
@@ -94,8 +94,6 @@ module Utils
# we cannot install brewed git if homebrew/core is unavailable.
if
CoreTap
.
instance
.
installed?
begin
oh1
"Installing
#{
Formatter
.
identifier
(
"git"
)
}
"
# Otherwise `git` will be installed from source in tests that need it. This is slow
# and will also likely fail due to `OS::Linux` and `OS::Mac` being undefined.
raise
"Refusing to install Git on a generic OS."
if
ENV
[
"HOMEBREW_TEST_GENERIC_OS"
]
...
...
编辑
预览
支持
Markdown
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录