From 700820106cdf89311bb3ef0bc0fac8f87a6a7927 Mon Sep 17 00:00:00 2001 From: yeyang <746659424@qq.com> Date: Fri, 19 May 2023 11:35:10 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=BA=20=E4=BF=AE=E6=94=B9=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E6=9B=B4=E6=96=B0=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/update.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/update.js b/apps/update.js index be17f8f..cb525bd 100644 --- a/apps/update.js +++ b/apps/update.js @@ -65,9 +65,10 @@ export class Update extends plugin { * @returns */ async runUpdate (isForce) { - let command = 'git -C ./plugins/yenai-plugin/ pull --no-rebase' + const _path = './plugins/yenai-plugin/' + let command = `git -C ${_path} pull --no-rebase` if (isForce) { - command = `git -C ./plugins/yenai-plugin/ checkout . && ${command}` + command = `git -C ${_path} fetch --all && git -C ${_path} reset --hard HEAD` this.e.reply('正在执行强制更新操作,请稍等') } else { this.e.reply('正在执行更新操作,请稍等')