From ccda01f1f9007689d67a7f1966c73c502b1963c1 Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 30 Apr 2025 15:04:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=9B=B4=E6=96=B0=E6=8C=87?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/system_updater/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/system_updater/main.py b/plugins/system_updater/main.py index 1da9efe..5bc2195 100644 --- a/plugins/system_updater/main.py +++ b/plugins/system_updater/main.py @@ -135,11 +135,10 @@ class SystemUpdaterPlugin(MessagePluginInterface): try: # 使用相对路径调用 restart.sh 脚本 result = subprocess.run( - ["./restart.sh"], # 使用相对路径 + ["/home/liuwei/wechatbot/WeChatRobot/restart.sh"], # 使用绝对路径 check=True, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - cwd=os.path.join(os.path.dirname(__file__)) # 确保在当前目录执行 + stderr=subprocess.PIPE ) # 打印执行结果