fix(dashboard): suppress unicode-animations postinstall during npm ci
Set CI=1 in _run_npm_install_deterministic so the package's /dev/tty postinstall demo is skipped during hermes dashboard web UI builds. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
743c55efa3
commit
ce99a81123
2 changed files with 23 additions and 2 deletions
|
|
@ -140,6 +140,22 @@ class TestBuildWebUISkipsWhenFresh:
|
|||
assert kwargs["encoding"] == "utf-8"
|
||||
assert kwargs["errors"] == "replace"
|
||||
|
||||
def test_npm_install_sets_ci_to_suppress_postinstall_tty_output(self, tmp_path):
|
||||
web_dir, _ = _make_web_dir(tmp_path)
|
||||
(web_dir / "package-lock.json").write_text("{}", encoding="utf-8")
|
||||
|
||||
mock_cp = __import__("subprocess").CompletedProcess([], 0, stdout="", stderr="")
|
||||
with patch("hermes_cli.main.subprocess.run", return_value=mock_cp) as mock_run:
|
||||
_run_npm_install_deterministic(
|
||||
"/usr/bin/npm",
|
||||
web_dir,
|
||||
env={"PYTHON": "/nix/store/python"},
|
||||
)
|
||||
|
||||
_, kwargs = mock_run.call_args
|
||||
assert kwargs["env"]["CI"] == "1"
|
||||
assert kwargs["env"]["PYTHON"] == "/nix/store/python"
|
||||
|
||||
def test_npm_install_uses_workspace_web_scope(self, tmp_path):
|
||||
web_dir, _ = _make_web_dir(tmp_path)
|
||||
# Real workspace checkout: the single lockfile lives at the root, so
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue