1
0
Fork 0
mirror of https://github.com/actions/setup-python.git synced 2024-11-22 06:26:25 +00:00

initial commit (#938)

This commit is contained in:
priya-kinthali 2024-09-06 22:10:29 +05:30 committed by GitHub
parent f677139bbe
commit 29a37be0a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 6 deletions

4
dist/setup/index.js vendored
View file

@ -92118,7 +92118,9 @@ function extractValue(obj, keys) {
*/ */
function getVersionInputFromTomlFile(versionFile) { function getVersionInputFromTomlFile(versionFile) {
core.debug(`Trying to resolve version form ${versionFile}`); core.debug(`Trying to resolve version form ${versionFile}`);
const pyprojectFile = fs_1.default.readFileSync(versionFile, 'utf8'); let pyprojectFile = fs_1.default.readFileSync(versionFile, 'utf8');
// Normalize the line endings in the pyprojectFile
pyprojectFile = pyprojectFile.replace(/\r\n/g, '\n');
const pyprojectConfig = toml.parse(pyprojectFile); const pyprojectConfig = toml.parse(pyprojectFile);
let keys = []; let keys = [];
if ('project' in pyprojectConfig) { if ('project' in pyprojectConfig) {

8
package-lock.json generated
View file

@ -4284,12 +4284,12 @@
} }
}, },
"node_modules/micromatch": { "node_modules/micromatch": {
"version": "4.0.5", "version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"braces": "^3.0.2", "braces": "^3.0.3",
"picomatch": "^2.3.1" "picomatch": "^2.3.1"
}, },
"engines": { "engines": {

View file

@ -224,7 +224,10 @@ function extractValue(obj: any, keys: string[]): string | undefined {
export function getVersionInputFromTomlFile(versionFile: string): string[] { export function getVersionInputFromTomlFile(versionFile: string): string[] {
core.debug(`Trying to resolve version form ${versionFile}`); core.debug(`Trying to resolve version form ${versionFile}`);
const pyprojectFile = fs.readFileSync(versionFile, 'utf8'); let pyprojectFile = fs.readFileSync(versionFile, 'utf8');
// Normalize the line endings in the pyprojectFile
pyprojectFile = pyprojectFile.replace(/\r\n/g, '\n');
const pyprojectConfig = toml.parse(pyprojectFile); const pyprojectConfig = toml.parse(pyprojectFile);
let keys = []; let keys = [];