Fix Feishu MCP npx resolution
This commit is contained in:
@@ -114,6 +114,28 @@ class FeishuIntegrationTests(unittest.TestCase):
|
||||
|
||||
self.assertEqual(url, 'https://mi.feishu.cn/docx/CZIldpM3QofbbXxxAq1cEininTd')
|
||||
|
||||
def test_feishu_command_uses_deployed_node_bin_dir(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as tmp_dir, patch.dict(
|
||||
gui_server.os.environ,
|
||||
{'CLAW_NODE_BIN_DIR': tmp_dir, 'PATH': ''},
|
||||
clear=False,
|
||||
):
|
||||
npx_path = Path(tmp_dir) / 'npx'
|
||||
npx_path.write_text('#!/usr/bin/env node\n', encoding='utf-8')
|
||||
npx_path.chmod(0o755)
|
||||
|
||||
command = gui_server._feishu_command()
|
||||
env = gui_server._feishu_env(
|
||||
{
|
||||
'home': Path(tmp_dir) / 'home',
|
||||
'config': Path(tmp_dir) / 'config',
|
||||
'npm_cache': Path(tmp_dir) / 'npm-cache',
|
||||
}
|
||||
)
|
||||
|
||||
self.assertEqual(command[0], str(npx_path))
|
||||
self.assertTrue(env['PATH'].startswith(tmp_dir))
|
||||
|
||||
def test_create_online_doc_rejects_jsonl_for_now(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as tmp_dir:
|
||||
client, state = _build_client(Path(tmp_dir))
|
||||
|
||||
Reference in New Issue
Block a user