File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
Original file line number Diff line number Diff line change @@ -92118,7 +92118,9 @@ function extractValue(obj, keys) {
92118
92118
*/
92119
92119
function getVersionInputFromTomlFile(versionFile) {
92120
92120
core.debug(`Trying to resolve version form ${versionFile}`);
92121
- const pyprojectFile = fs_1.default.readFileSync(versionFile, 'utf8');
92121
+ let pyprojectFile = fs_1.default.readFileSync(versionFile, 'utf8');
92122
+ // Normalize the line endings in the pyprojectFile
92123
+ pyprojectFile = pyprojectFile.replace(/\r\n/g, '\n');
92122
92124
const pyprojectConfig = toml.parse(pyprojectFile);
92123
92125
let keys = [];
92124
92126
if ('project' in pyprojectConfig) {
Original file line number Diff line number Diff line change @@ -224,7 +224,10 @@ function extractValue(obj: any, keys: string[]): string | undefined {
224
224
export function getVersionInputFromTomlFile ( versionFile : string ) : string [ ] {
225
225
core . debug ( `Trying to resolve version form ${ versionFile } ` ) ;
226
226
227
- const pyprojectFile = fs . readFileSync ( versionFile , 'utf8' ) ;
227
+ let pyprojectFile = fs . readFileSync ( versionFile , 'utf8' ) ;
228
+ // Normalize the line endings in the pyprojectFile
229
+ pyprojectFile = pyprojectFile . replace ( / \r \n / g, '\n' ) ;
230
+
228
231
const pyprojectConfig = toml . parse ( pyprojectFile ) ;
229
232
let keys = [ ] ;
230
233
You can’t perform that action at this time.
0 commit comments