File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,15 +67,15 @@ function sleep(wait) {
6767}
6868
6969function selectAsset ( assets ) {
70- const assetMap = {
71- win32 : 'windows' ,
72- darwin : 'macos-arm64' ,
73- } ;
74- const assetMatch = assetMap ?. [ process . platform ] ;
75- if ( ! assetMatch ) {
70+ if ( process . platform === 'win32' ) {
71+ return assets . find ( asset => asset . name . includes ( 'python-env-windows' ) ) ;
72+ } else if ( process . platform === 'darwin' && process . arch === 'x64' ) {
73+ return assets . find ( asset => asset . name . includes ( 'python-env-x64' ) ) ;
74+ } else if ( process . platform === 'darwin' && process . arch === 'arm64' ) {
75+ return assets . find ( asset => asset . name . includes ( 'python-env-arm64' ) ) ;
76+ } else {
7677 throw new Error ( 'Unsupported platform' ) ;
7778 }
78- return assets . find ( asset => asset . name . includes ( assetMatch ) ) ;
7979}
8080
8181async function getLatestRelease ( ) {
You can’t perform that action at this time.
0 commit comments