Skip to content

Commit

Permalink
Trim python version to get rid of '\n' (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
FerranPares authored Oct 6, 2023
1 parent 65d7f2d commit 3467d92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70160,7 +70160,7 @@ exports.getVersionInputFromTomlFile = getVersionInputFromTomlFile;
*/
function getVersionInputFromPlainFile(versionFile) {
core.debug(`Trying to resolve version form ${versionFile}`);
const version = fs_1.default.readFileSync(versionFile, 'utf8');
const version = fs_1.default.readFileSync(versionFile, 'utf8').trim();
core.info(`Resolved ${versionFile} as ${version}`);
return [version];
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export function getVersionInputFromTomlFile(versionFile: string): string[] {
*/
export function getVersionInputFromPlainFile(versionFile: string): string[] {
core.debug(`Trying to resolve version form ${versionFile}`);
const version = fs.readFileSync(versionFile, 'utf8');
const version = fs.readFileSync(versionFile, 'utf8').trim();
core.info(`Resolved ${versionFile} as ${version}`);
return [version];
}
Expand Down

0 comments on commit 3467d92

Please sign in to comment.