🦺 修改强制更新命令

This commit is contained in:
yeyang
2023-05-19 11:35:10 +08:00
parent ce9dca8fee
commit 700820106c

View File

@@ -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('正在执行更新操作,请稍等')