File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ Samples:
6767
6868``` txt
6969https://github.com/oven-sh/bun/releases/download/bun-v1.0.0/bun-linux-x64.zip
70+ https://github.com/oven-sh/bun/releases/download/bun-v1.0.0/bun-linux-x64-baseline.zip
7071https://github.com/oven-sh/bun/releases/download/bun-v1.0.0/bun-linux-aarch64.zip
7172https://github.com/oven-sh/bun/releases/download/bun-v1.0.0/SHASUMS256.txt
7273```
Original file line number Diff line number Diff line change @@ -19,7 +19,20 @@ export class BunInstallService extends BaseInstallService {
1919
2020 override async install ( version : string ) : Promise < void > {
2121 const baseUrl = `https://github.com/oven-sh/bun/releases/download/bun-v${ version } /` ;
22- const filename = `bun-linux-${ this . ghArch } .zip` ;
22+ let { ghArch } = this ;
23+
24+ if ( ghArch === 'x64' ) {
25+ try {
26+ const cpuInfo = await fs . readFile ( '/proc/cpuinfo' , 'utf-8' ) ;
27+ if ( ! cpuInfo . includes ( 'avx2' ) ) {
28+ ghArch = 'x64-baseline' ;
29+ }
30+ } catch {
31+ ghArch = 'x64-baseline' ;
32+ }
33+ }
34+
35+ const filename = `bun-linux-${ ghArch } .zip` ;
2336
2437 const checksumFile = await this . http . download ( {
2538 url : `${ baseUrl } SHASUMS256.txt` ,
You can’t perform that action at this time.
0 commit comments