File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,16 @@ export default class ComponentDetection {
315315 let downloadURL : string = "" ;
316316 // TODO: do we need to handle different architectures here?
317317 // can we allow x64 on MacOS? We could allow an input parameter to override?
318- const assetName = process . platform === "win32" ? "component-detection-win-x64.exe" : process . platform === "linux" ? "component-detection-linux-x64" : "component-detection-osx-arm64" ;
318+ let assetName : string ;
319+ if ( process . platform === "win32" ) {
320+ assetName = "component-detection-win-x64.exe" ;
321+ } else if ( process . platform === "linux" ) {
322+ assetName = "component-detection-linux-x64" ;
323+ } else if ( process . platform === "darwin" ) {
324+ assetName = "component-detection-osx-arm64" ;
325+ } else {
326+ throw new Error ( `Unsupported platform: ${ process . platform } ` ) ;
327+ }
319328 latestRelease . data . assets . forEach ( ( asset : any ) => {
320329 if ( asset . name === assetName ) {
321330 downloadURL = asset . browser_download_url ;
You can’t perform that action at this time.
0 commit comments