From 23353a36734def0787f2719a6953adba5aed5111 Mon Sep 17 00:00:00 2001 From: snowy Date: Wed, 10 Apr 2024 12:18:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8F=90=E4=BE=9B=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- liteyuki/plugins/liteyuki_pacman/npm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/liteyuki/plugins/liteyuki_pacman/npm.py b/liteyuki/plugins/liteyuki_pacman/npm.py index 0586f215..15cc7fa7 100644 --- a/liteyuki/plugins/liteyuki_pacman/npm.py +++ b/liteyuki/plugins/liteyuki_pacman/npm.py @@ -427,9 +427,10 @@ def npm_install(plugin_package_name) -> tuple[bool, str]: plugin_package_name: Returns: - tuple[bool, str]: + tuple[bool, str]: 是否成功,输出信息 """ + # 重定向标准输出 buffer = StringIO() sys.stdout = buffer sys.stderr = buffer @@ -456,9 +457,8 @@ def npm_install(plugin_package_name) -> tuple[bool, str]: if success: break else: - nonebot.logger.warning(f"npm_install failed, try next mirror.") + nonebot.logger.warning(f"pip install failed, try next mirror.") except Exception as e: - success = False continue