File tree 2 files changed +8
-3
lines changed 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ export const useCoreBranch = (isAlpha = false) => {
77
77
if ( body . message ) throw body . message
78
78
79
79
const { assets, name } = isAlpha ? body . find ( ( v : any ) => v . prerelease === true ) : body
80
- const assetName = getKernelAssetFileName ( name )
80
+ const assetName = getKernelAssetFileName ( name , isAlpha )
81
81
const asset = assets . find ( ( v : any ) => v . name === assetName )
82
82
if ( ! asset ) throw 'Asset Not Found:' + assetName
83
83
if ( asset . uploader . type !== 'Bot' ) {
Original file line number Diff line number Diff line change @@ -507,10 +507,15 @@ export const getKernelFileName = (isAlpha = false) => {
507
507
return `sing-box${ latest } ${ fileSuffix } `
508
508
}
509
509
510
- export const getKernelAssetFileName = ( version : string ) => {
510
+ export const getKernelAssetFileName = ( version : string , isAlpha = false ) => {
511
511
const envStore = useEnvStore ( )
512
512
const { os, arch } = envStore . env
513
- const legacy = arch === 'amd64' && envStore . env . x64Level < 3 ? '-legacy' : ''
513
+ const legacy =
514
+ ( os === 'windows' || ( os === 'darwin' && ! isAlpha ) ) &&
515
+ arch === 'amd64' &&
516
+ envStore . env . x64Level < 3
517
+ ? '-legacy'
518
+ : ''
514
519
const suffix = { windows : '.zip' , linux : '.tar.gz' , darwin : '.tar.gz' } [ os ]
515
520
return `sing-box-${ version } -${ os } -${ arch } ${ legacy } ${ suffix } `
516
521
}
You can’t perform that action at this time.
0 commit comments