mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 15:32:13 +00:00
Debug
This commit is contained in:
parent
5041c3b04f
commit
82e58e0e69
2 changed files with 19 additions and 14 deletions
16
dist/setup/index.js
vendored
16
dist/setup/index.js
vendored
|
@ -66565,10 +66565,7 @@ function pypyVersionToSemantic(versionSpec) {
|
|||
}
|
||||
exports.pypyVersionToSemantic = pypyVersionToSemantic;
|
||||
function isArchPresentForWindows(item, architecture) {
|
||||
// convert x32 to x86 cause os.arch() return x32 for 32-bit system but PyPy releases json has x86 arch value.
|
||||
if (architecture === 'x32') {
|
||||
architecture = 'x86';
|
||||
}
|
||||
architecture = ReplaceX32toX86(architecture);
|
||||
return item.files.some((file) => {
|
||||
return file.arch === architecture && utils_1.WINDOWS_PLATFORMS.includes(file.platform);
|
||||
});
|
||||
|
@ -66579,9 +66576,7 @@ function isArchPresentForMacOrLinux(item, architecture, platform) {
|
|||
}
|
||||
exports.isArchPresentForMacOrLinux = isArchPresentForMacOrLinux;
|
||||
function findAssetForWindows(releases, architecture) {
|
||||
if (architecture === 'x32') {
|
||||
architecture = 'x86';
|
||||
}
|
||||
architecture = ReplaceX32toX86(architecture);
|
||||
return releases.files.find((item) => {
|
||||
return item.arch === architecture && utils_1.WINDOWS_PLATFORMS.includes(item.platform);
|
||||
});
|
||||
|
@ -66591,6 +66586,13 @@ function findAssetForMacOrLinux(releases, architecture, platform) {
|
|||
return releases.files.find((item) => item.arch === architecture && item.platform === platform);
|
||||
}
|
||||
exports.findAssetForMacOrLinux = findAssetForMacOrLinux;
|
||||
function ReplaceX32toX86(architecture) {
|
||||
// convert x32 to x86 because os.arch() return x32 for 32-bit systems but PyPy releases json has x86 arch value.
|
||||
if (architecture === 'x32') {
|
||||
architecture = 'x86';
|
||||
}
|
||||
return architecture;
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
|
|
@ -206,10 +206,7 @@ export function pypyVersionToSemantic(versionSpec: string) {
|
|||
}
|
||||
|
||||
export function isArchPresentForWindows(item: any, architecture: string) {
|
||||
// convert x32 to x86 cause os.arch() return x32 for 32-bit system but PyPy releases json has x86 arch value.
|
||||
if (architecture === 'x32') {
|
||||
architecture = 'x86';
|
||||
}
|
||||
architecture = ReplaceX32toX86(architecture);
|
||||
return item.files.some(
|
||||
(file: any) => {
|
||||
return file.arch === architecture && WINDOWS_PLATFORMS.includes(file.platform);
|
||||
|
@ -228,9 +225,7 @@ export function isArchPresentForMacOrLinux(
|
|||
}
|
||||
|
||||
export function findAssetForWindows(releases: any, architecture: string) {
|
||||
if (architecture === 'x32') {
|
||||
architecture = 'x86';
|
||||
}
|
||||
architecture = ReplaceX32toX86(architecture);
|
||||
return releases.files.find(
|
||||
(item: any) => {
|
||||
return item.arch === architecture && WINDOWS_PLATFORMS.includes(item.platform);
|
||||
|
@ -247,3 +242,11 @@ export function findAssetForMacOrLinux(
|
|||
(item: any) => item.arch === architecture && item.platform === platform
|
||||
);
|
||||
}
|
||||
|
||||
function ReplaceX32toX86(architecture: string): string {
|
||||
// convert x32 to x86 because os.arch() return x32 for 32-bit systems but PyPy releases json has x86 arch value.
|
||||
if (architecture === 'x32') {
|
||||
architecture = 'x86';
|
||||
}
|
||||
return architecture;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue