Skip to content

Commit

Permalink
v0.2 tweaks
Browse files Browse the repository at this point in the history
* GIT_COMMITTER_DATE
  • Loading branch information
Eccenux committed Jul 13, 2023
1 parent 9ef4c14 commit 55fdd26
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/GitOps.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ export default class GitOps {
args.push('-m'); args.push(history.message);
args.push(this.pAuthor(history));
args.push(this.pDate(history));
const result = await this.execFile('git', args, this.dir);
let env = {};
env.GIT_COMMITTER_DATE = history.dt.toString().trim();
const result = await this.execFile('git', args, this.dir, env);
if (!result) {
throw 'Unable to commit changes!';
}
Expand Down Expand Up @@ -118,8 +120,8 @@ export default class GitOps {
}

/** @private Execute and report problems. */
async execFile(cmd, args, dir) {
const { stdout, stderr } = await execFile(cmd, args, {cwd: dir});
async execFile(cmd, args, dir, env) {
const { stdout, stderr } = await execFile(cmd, args, {cwd: dir, env: env});
return this.execInfo(stdout, stderr);
}
}

0 comments on commit 55fdd26

Please sign in to comment.