mirror of
https://github.com/actions/setup-python.git
synced 2025-07-18 06:48:20 +02:00
Update src/utils.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
8681d8c52c
commit
7b8a9f9768
1 changed files with 4 additions and 0 deletions
|
@ -332,6 +332,10 @@ export function getVersionInputFromToolVersions(versionFile: string): string[] {
|
||||||
export function getVersionInputFromPipfileFile(versionFile: string): string[] {
|
export function getVersionInputFromPipfileFile(versionFile: string): string[] {
|
||||||
core.debug(`Trying to resolve version from ${versionFile}`);
|
core.debug(`Trying to resolve version from ${versionFile}`);
|
||||||
|
|
||||||
|
if (!fs.existsSync(versionFile)) {
|
||||||
|
core.warning(`File ${versionFile} does not exist.`);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
let pipfileFile = fs.readFileSync(versionFile, 'utf8');
|
let pipfileFile = fs.readFileSync(versionFile, 'utf8');
|
||||||
// Normalize the line endings in the pipfileFile
|
// Normalize the line endings in the pipfileFile
|
||||||
pipfileFile = pipfileFile.replace(/\r\n/g, '\n');
|
pipfileFile = pipfileFile.replace(/\r\n/g, '\n');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue