mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 05:17:10 +00:00
fix: finally
This commit is contained in:
parent
fd197abb33
commit
1788ee6d7d
1 changed files with 55 additions and 49 deletions
|
|
@ -68,6 +68,7 @@ export class Update extends plugin {
|
|||
* @returns
|
||||
*/
|
||||
async runUpdate (isForce) {
|
||||
try {
|
||||
let command = 'git -C ./plugins/chatgpt-plugin/ pull --no-rebase'
|
||||
if (isForce) {
|
||||
command = `git -C ./plugins/chatgpt-plugin/ checkout . && ${command}`
|
||||
|
|
@ -94,10 +95,8 @@ export class Update extends plugin {
|
|||
if (npmRet.error) {
|
||||
logger.mark(`${this.e.logFnc} 更新失败:chaite 依赖`)
|
||||
await this.reply(`chaite 依赖更新失败:\n${npmRet.error.toString()}`)
|
||||
uping = false
|
||||
return false
|
||||
}
|
||||
uping = false
|
||||
/** 获取插件提交的最新时间 */
|
||||
let time = await this.getTime('chatgpt-plugin')
|
||||
|
||||
|
|
@ -121,6 +120,13 @@ export class Update extends plugin {
|
|||
logger.mark(`${this.e.logFnc} 最后更新时间:${time}`)
|
||||
|
||||
return true
|
||||
} catch (err) {
|
||||
logger.error(err)
|
||||
await this.reply(`更新失败:\n${err.toString()}`)
|
||||
return false
|
||||
} finally {
|
||||
uping = false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue