mirror of
https://github.com/actions/setup-python.git
synced 2025-07-02 23:53:47 +00:00
Refactor
This commit is contained in:
parent
de93cfa81c
commit
5d1b76c2b8
2 changed files with 10 additions and 4 deletions
|
@ -206,10 +206,13 @@ 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';
|
||||
}
|
||||
return item.files.some(
|
||||
(file: any) =>
|
||||
file.arch === (architecture === 'x32' ? 'x86' : architecture) && // convert x32 to x86 cause os.arch() return x32 for 32-bit system but PyPy releases json has x86 arch value.
|
||||
WINDOWS_PLATFORMS.includes(file.platform)
|
||||
file.arch === architecture && WINDOWS_PLATFORMS.includes(file.platform)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue