This commit is contained in:
bietiaop 2024-08-20 14:43:58 +08:00
parent f698a6ebc3
commit a27c33e41e

View file

@ -30,17 +30,18 @@ if (Update) {
exec(cmd, plugin, opts = {}) { exec(cmd, plugin, opts = {}) {
if (plugin) opts.cwd = `plugins/${plugin}`; if (plugin) opts.cwd = `plugins/${plugin}`;
return new Promise(resolve => { return new Promise(resolve => {
exec(cmd, { windowsHide: true }, (error, stdout, stderr) => { exec(cmd, { windowsHide: true, ...opts }, (error, stdout, stderr) => {
resolve({ error, stdout, stderr }); resolve({ error, stdout, stderr });
}); });
}); });
} }
async handleLog(remote = false) { async handleLog(remote = false) {
let cmdStr = 'git log -100 --pretty="%h||%cd||%s" --date=format:"%F %T"'; let cmdStr =
'git log -100 --pretty="%h||%cd||%s" --date=format:"%Y-%m-%d %H:%M:%S"';
if (remote) { if (remote) {
cmdStr = cmdStr =
'git log -100 --pretty="%h||%cd||%s" --date=format:"%F %T" origin/main'; 'git log -100 --pretty="%h||%cd||%s" --date=format:"%Y-%m-%d %H:%M:%S" origin/main';
} }
const cm = await this.exec(cmdStr, pluginName); const cm = await this.exec(cmdStr, pluginName);
if (cm.error) { if (cm.error) {