Skip to content

Commit

Permalink
bun: Add pre_install check for CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
sitiom committed Apr 1, 2024
1 parent 6149a81 commit c3c4343
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bucket/bun.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
"hash": "60e9291d09657ab315bcc6bc07cbf67d2e9b9b18c21bb7cf9ce2d9fa983c9719"
}
},
"pre_install": [
"if (-not (Add-Type -MemberDefinition '[DllImport(\"kernel32.dll\")] public static extern bool IsProcessorFeaturePresent(int ProcessorFeature);'-Name 'Kernel32'-Namespace 'Win32'-PassThru)::IsProcessorFeaturePresent(40)) {",
" Write-Host -Foreground Red \"This CPU does not support AVX2 instructions. please install 'bun-baseline' instead.\"",
" break",
"}"
],
"extract_dir": "bun-windows-x64",
"bin": [
"bun.exe",
Expand Down

0 comments on commit c3c4343

Please sign in to comment.