🌈 style: 美化代码格式,方便阅读源码!

This commit is contained in:
zhiyu1998 2023-02-19 17:38:35 +08:00
parent d01a515dc8
commit d528d94245

View File

@ -63,7 +63,7 @@ export class update extends plugin {
} else { } else {
command = `git -C ./plugins/${pluginName}/ pull --no-rebase`; command = `git -C ./plugins/${pluginName}/ pull --no-rebase`;
} }
this.oldCommitId = await this.getcommitId(pluginName); this.oldCommitId = await this.getCommitId(pluginName);
await e.reply("正在执行更新操作,请稍等"); await e.reply("正在执行更新操作,请稍等");
let ret = await this.execSync(command); let ret = await this.execSync(command);
@ -83,7 +83,7 @@ export class update extends plugin {
return true; return true;
} }
async getcommitId(pluginName) { async getCommitId(pluginName) {
// let cm = 'git rev-parse --short HEAD' // let cm = 'git rev-parse --short HEAD'
const command = `git -C ./plugins/${pluginName}/ rev-parse --short HEAD`; const command = `git -C ./plugins/${pluginName}/ rev-parse --short HEAD`;
let commitId = execSync(command, { encoding: "utf-8" }); let commitId = execSync(command, { encoding: "utf-8" });