Skip to content

Commit

Permalink
fix(index): fix variable resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
tuunit committed Mar 28, 2024
1 parent cc3b522 commit 7b4c4be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20456,7 +20456,7 @@ const exec = (cmd, args = []) =>
if (code !== 0 && !stdout.includes("nothing to commit")) {
return reject(new Error(`Exit code: ${code}\n${stdout}`));
}
return resolve({ code, stdout });
return resolve(stdout);
});

app.on("error", () => reject(new Error(`Exit code: ${code}\n${stderr}`)));
Expand Down Expand Up @@ -20485,7 +20485,7 @@ const commitFile = async (emptyCommit = false) => {
* @returns {Promise<void>}
* */
const createEmptyCommit = async () => {
const { stdout: lastCommitDate } = await exec("git", [
const lastCommitDate = await exec("git", [
"--no-pager",
"log",
"-1",
Expand All @@ -20497,7 +20497,7 @@ const createEmptyCommit = async () => {
(new Date() - commitDate) / (1000 * 60 * 60 * 24),
);

core.debug(`Last commit date: ${commitDate}`)
core.debug(`Last commit date: ${commitDate}`);
core.debug(`Difference in days: ${diffInDays}`);

if (diffInDays > 50) {
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const exec = (cmd, args = []) =>
if (code !== 0 && !stdout.includes("nothing to commit")) {
return reject(new Error(`Exit code: ${code}\n${stdout}`));
}
return resolve({ code, stdout });
return resolve(stdout);
});

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

0 comments on commit 7b4c4be

Please sign in to comment.