mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-03-14 22:26:58 +01:00
update the logic
This commit is contained in:
parent
1140d87ee4
commit
c628d93a80
2 changed files with 2 additions and 2 deletions
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
|
@ -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)
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue