1
0
Fork 0
mirror of https://github.com/actions/setup-python.git synced 2025-04-08 09:08:37 +00:00

update the logic

This commit is contained in:
Aparna Jyothi 2025-02-19 13:24:53 +05:30
parent 1140d87ee4
commit c628d93a80
2 changed files with 2 additions and 2 deletions

2
dist/setup/index.js vendored
View file

@ -99609,7 +99609,7 @@ function useCpythonVersion(version, architecture, updateEnvironment, checkLatest
const version = path.basename(path.dirname(installDir));
const major = semver.major(version);
const minor = semver.minor(version);
if (parseFloat(version) >= 3.10 && architecture !== 'x64') {
if ((major > 3 || (major === 3 && minor >= 10)) && architecture !== 'x64') {
// For Python >= 3.10 and architecture!= 'x64', add the architecture-specific folder to the path
const arch = architecture === '32';
const userScriptsDir = path.join(process.env['APPDATA'] || '', 'Python', `Python${major}${minor}-${arch}`, // Add architecture-specific folder (e.g., Python310-64 or Python310-32)

View file

@ -139,7 +139,7 @@ export async function useCpythonVersion(
const major = semver.major(version);
const minor = semver.minor(version);
if (parseFloat(version) >= 3.10 && architecture !== 'x64') {
if ((major > 3 || (major === 3 && minor >= 10)) && architecture !== 'x64') {
// For Python >= 3.10 and architecture!= 'x64', add the architecture-specific folder to the path
const arch = architecture === '32';