Update update.js (#173)

This commit is contained in:
sameu 2023-06-12 03:24:09 +08:00 committed by GitHub
parent e6574a0f11
commit 1d46675d63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -108,10 +108,13 @@ export class update extends plugin {
} }
if (plugin) { if (plugin) {
cm = `git -C ./plugins/${plugin}/ pull --no-rebase` if (this.e.msg.includes('强制')) {
// 请带上脑子来水pr type = '强制更新'
// cm = `git -C ./plugins/${plugin}/ fetch --all && git -C ./plugins/${plugin}/ reset --hard && git -C ./plugins/${plugin}/ pull` 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) this.oldCommitId = await this.getcommitId(plugin)