Skip to content

Commit

Permalink
Add debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mikogs committed Oct 24, 2023
1 parent bb59bee commit f684492
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion replace-string/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ try {
strToReplace = inString;
}

console.log(strToReplace);
console.log(inReplaceRegex);
console.log(inFlags);
console.log(inReplaceWith);

const regex = new RegExp(inReplaceRegex, inFlags);
strReplaced = strToReplace.replace(regex, inReplaceWith);

Expand All @@ -42,7 +47,7 @@ try {
fs.writeFileSync(inWriteToFile, strReplaced);
}

core.setOutput('replaced-string');
core.setOutput('replaced-string', strReplaced);
} catch (error) {
core.setFailed(error.message);
}

0 comments on commit f684492

Please sign in to comment.