Skip to content

Commit

Permalink
fix: strip new line ending from shas (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav authored Mar 16, 2022
1 parent d1d0b3b commit a11877f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6408,8 +6408,10 @@ let BASE_SHA;
process.stdout.write(`Commit: ${BASE_SHA}\n`);
}
}
core.setOutput('base', BASE_SHA);
core.setOutput('head', HEAD_SHA);

const stripNewLineEndings = sha => sha.replace('\n', '');
core.setOutput('base', stripNewLineEndings(BASE_SHA));
core.setOutput('head', stripNewLineEndings(HEAD_SHA));
})();

function reportFailure(branchName) {
Expand Down
6 changes: 4 additions & 2 deletions find-successful-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ let BASE_SHA;
process.stdout.write(`Commit: ${BASE_SHA}\n`);
}
}
core.setOutput('base', BASE_SHA);
core.setOutput('head', HEAD_SHA);

const stripNewLineEndings = sha => sha.replace('\n', '');
core.setOutput('base', stripNewLineEndings(BASE_SHA));
core.setOutput('head', stripNewLineEndings(HEAD_SHA));
})();

function reportFailure(branchName) {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "2.1.4",
"version": "2.1.5",
"license": "MIT",
"description": "This package.json is here purely to control the version of the Action, in combination with https://github.com/JamesHenry/publish-shell-action",
"scripts": {
Expand Down

0 comments on commit a11877f

Please sign in to comment.