Skip to content

Commit 7b4c4be

Browse files
committed
fix(index): fix variable resolution
1 parent cc3b522 commit 7b4c4be

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dist/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -20456,7 +20456,7 @@ const exec = (cmd, args = []) =>
2045620456
if (code !== 0 && !stdout.includes("nothing to commit")) {
2045720457
return reject(new Error(`Exit code: ${code}\n${stdout}`));
2045820458
}
20459-
return resolve({ code, stdout });
20459+
return resolve(stdout);
2046020460
});
2046120461

2046220462
app.on("error", () => reject(new Error(`Exit code: ${code}\n${stderr}`)));
@@ -20485,7 +20485,7 @@ const commitFile = async (emptyCommit = false) => {
2048520485
* @returns {Promise<void>}
2048620486
* */
2048720487
const createEmptyCommit = async () => {
20488-
const { stdout: lastCommitDate } = await exec("git", [
20488+
const lastCommitDate = await exec("git", [
2048920489
"--no-pager",
2049020490
"log",
2049120491
"-1",
@@ -20497,7 +20497,7 @@ const createEmptyCommit = async () => {
2049720497
(new Date() - commitDate) / (1000 * 60 * 60 * 24),
2049820498
);
2049920499

20500-
core.debug(`Last commit date: ${commitDate}`)
20500+
core.debug(`Last commit date: ${commitDate}`);
2050120501
core.debug(`Difference in days: ${diffInDays}`);
2050220502

2050320503
if (diffInDays > 50) {

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const exec = (cmd, args = []) =>
7777
if (code !== 0 && !stdout.includes("nothing to commit")) {
7878
return reject(new Error(`Exit code: ${code}\n${stdout}`));
7979
}
80-
return resolve({ code, stdout });
80+
return resolve(stdout);
8181
});
8282

8383
app.on("error", () => reject(new Error(`Exit code: ${code}\n${stderr}`)));
@@ -106,7 +106,7 @@ const commitFile = async (emptyCommit = false) => {
106106
* @returns {Promise<void>}
107107
* */
108108
const createEmptyCommit = async () => {
109-
const { stdout: lastCommitDate } = await exec("git", [
109+
const lastCommitDate = await exec("git", [
110110
"--no-pager",
111111
"log",
112112
"-1",

0 commit comments

Comments
 (0)