mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
fmt
This commit is contained in:
@@ -35,21 +35,23 @@ better-sqlite3 is not supported yet in Bun due to missing V8 C++ APIs. For now,
|
||||
|
||||
// Check for CPU architecture issues (Segmentation Fault/Illegal Instruction with no_avx)
|
||||
else if (
|
||||
(body.includes("Segmentation Fault") ||
|
||||
body.includes("Illegal Instruction") ||
|
||||
body.includes("IllegalInstruction")) &&
|
||||
(body.includes("Segmentation Fault") ||
|
||||
body.includes("Illegal Instruction") ||
|
||||
body.includes("IllegalInstruction")) &&
|
||||
body.includes("no_avx")
|
||||
) {
|
||||
let comment = `Bun requires a CPU with the micro-architecture [\`nehalem\`](https://en.wikipedia.org/wiki/Nehalem_(microarchitecture)) or later (released in 2008). If you're using a CPU emulator like qemu, then try enabling x86-64-v2.`;
|
||||
|
||||
|
||||
// Check if it's macOS
|
||||
const platformMatch = body.match(/Platform:\s*([^\n]+)/i) || body.match(/on\s+(macos|darwin)/i);
|
||||
const isMacOS = platformMatch && (platformMatch[1]?.toLowerCase().includes("darwin") || platformMatch[1]?.toLowerCase().includes("macos"));
|
||||
|
||||
const isMacOS =
|
||||
platformMatch &&
|
||||
(platformMatch[1]?.toLowerCase().includes("darwin") || platformMatch[1]?.toLowerCase().includes("macos"));
|
||||
|
||||
if (isMacOS) {
|
||||
comment += `\n\nIf you're on a macOS silicon device, you're running Bun via the Rosetta CPU emulator and your best option is to run Bun natively instead.`;
|
||||
}
|
||||
|
||||
|
||||
closeAction = {
|
||||
reason: "not_planned",
|
||||
comment,
|
||||
@@ -58,11 +60,13 @@ else if (
|
||||
|
||||
if (closeAction) {
|
||||
// Output the action to take
|
||||
console.write(JSON.stringify({
|
||||
close: true,
|
||||
reason: closeAction.reason,
|
||||
comment: closeAction.comment,
|
||||
}));
|
||||
console.write(
|
||||
JSON.stringify({
|
||||
close: true,
|
||||
reason: closeAction.reason,
|
||||
comment: closeAction.comment,
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
console.write(JSON.stringify({ close: false }));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user