mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
fix: git
This commit is contained in:
parent
f698a6ebc3
commit
a27c33e41e
1 changed files with 4 additions and 3 deletions
|
|
@ -30,17 +30,18 @@ if (Update) {
|
|||
exec(cmd, plugin, opts = {}) {
|
||||
if (plugin) opts.cwd = `plugins/${plugin}`;
|
||||
return new Promise(resolve => {
|
||||
exec(cmd, { windowsHide: true }, (error, stdout, stderr) => {
|
||||
exec(cmd, { windowsHide: true, ...opts }, (error, stdout, stderr) => {
|
||||
resolve({ error, stdout, stderr });
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
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) {
|
||||
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);
|
||||
if (cm.error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue