From 1d46675d63699654ac418230f6261cbe2f69f7a5 Mon Sep 17 00:00:00 2001 From: sameu Date: Mon, 12 Jun 2023 03:24:09 +0800 Subject: [PATCH] Update update.js (#173) --- plugins/other/update.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/other/update.js b/plugins/other/update.js index 93fb161..e919b5a 100644 --- a/plugins/other/update.js +++ b/plugins/other/update.js @@ -108,10 +108,13 @@ export class update extends plugin { } if (plugin) { - cm = `git -C ./plugins/${plugin}/ pull --no-rebase` - // 请带上脑子来水pr - // cm = `git -C ./plugins/${plugin}/ fetch --all && git -C ./plugins/${plugin}/ reset --hard && git -C ./plugins/${plugin}/ pull` - } + if (this.e.msg.includes('强制')) { + type = '强制更新' + cm = `git -C ./plugins/${plugin}/ fetch --all && git -C ./plugins/${plugin}/ reset --hard && git -C ./plugins/${plugin}/ pull` + }else{ + cm = `git -C ./plugins/${plugin}/ pull --no-rebase` + } +} this.oldCommitId = await this.getcommitId(plugin)