diff --git a/action.js b/action.js index c86884c..3a2157d 100644 --- a/action.js +++ b/action.js @@ -61,7 +61,7 @@ async function updateGoVersion(goVersion) { } async function detectGitChanges() { - let gitChanges; + let gitChanges = ''; const execOptionsGitChanges = {}; execOptionsGitChanges.listeners = { stdout: (data) => { @@ -77,7 +77,7 @@ async function detectGitChanges() { core.info("gitChanges undefined check end") core.info("gitChanges not empty check: ") - core.info(gitChanges !== "") + core.info(gitChanges != "") core.info("gitChanges not empty check end") core.info("gitChanges output: ") @@ -87,7 +87,7 @@ async function detectGitChanges() { core.info("Whole check evaluation: ") core.info(gitChanges !== undefined && gitChanges !== "") core.info("Whole check evaluation end") - return gitChanges !== undefined && gitChanges !== "" + return gitChanges !== '' } async function branchWithNameAlreadyExist(githubToken, branchName, repoOwner, repoName) { diff --git a/dist/index.js b/dist/index.js index bd82b97..901bbdf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -67,7 +67,7 @@ async function updateGoVersion(goVersion) { } async function detectGitChanges() { - let gitChanges; + let gitChanges = ''; const execOptionsGitChanges = {}; execOptionsGitChanges.listeners = { stdout: (data) => { @@ -83,7 +83,7 @@ async function detectGitChanges() { core.info("gitChanges undefined check end") core.info("gitChanges not empty check: ") - core.info(gitChanges !== "") + core.info(gitChanges != "") core.info("gitChanges not empty check end") core.info("gitChanges output: ") @@ -93,7 +93,7 @@ async function detectGitChanges() { core.info("Whole check evaluation: ") core.info(gitChanges !== undefined && gitChanges !== "") core.info("Whole check evaluation end") - return gitChanges !== undefined && gitChanges !== "" + return gitChanges !== '' } async function branchWithNameAlreadyExist(githubToken, branchName, repoOwner, repoName) {