mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-14 12:10:45 +03:00
fix(tui): report x64 emulation on Windows ARM64 (#54984)
This commit is contained in:
committed by
GitHub
Unverified
parent
3731aace4a
commit
bd23808adf
@@ -51,6 +51,9 @@ const reportContentWithDiagnostics = Effect.fn("SkillPlugin.reportContentWithDia
|
||||
app: Context["app"],
|
||||
) {
|
||||
const plugins = yield* configuredPlugins()
|
||||
// Under emulation on Windows ARM64, os.arch() reads x64 but PROCESSOR_IDENTIFIER still names the ARM host.
|
||||
const emulated =
|
||||
process.platform === "win32" && os.arch() === "x64" && process.env.PROCESSOR_IDENTIFIER?.startsWith("ARM")
|
||||
return [
|
||||
ReportContent,
|
||||
"",
|
||||
@@ -60,7 +63,7 @@ const reportContentWithDiagnostics = Effect.fn("SkillPlugin.reportContentWithDia
|
||||
"",
|
||||
`- opencode version: ${app.version}`,
|
||||
`- install/channel: ${app.channel}`,
|
||||
`- OS: ${os.type()} ${os.release()} (${os.platform()} ${os.arch()})`,
|
||||
`- OS: ${os.type()} ${os.release()} (${os.platform()} ${os.arch()}${emulated ? ", emulated on ARM64" : ""})`,
|
||||
`- Terminal: ${terminal()}`,
|
||||
`- Shell: ${shell()}`,
|
||||
`- Active plugins: ${plugins.length === 0 ? "None found in config" : plugins.join(", ")}`,
|
||||
|
||||
@@ -9,7 +9,10 @@ export function describeOS() {
|
||||
: process.platform === "linux"
|
||||
? "Linux"
|
||||
: process.platform
|
||||
return `${name} ${release()} (${process.arch})`
|
||||
// Under emulation on Windows ARM64, process.arch reads x64 but PROCESSOR_IDENTIFIER still names the ARM host.
|
||||
const emulated =
|
||||
process.platform === "win32" && process.arch === "x64" && process.env.PROCESSOR_IDENTIFIER?.startsWith("ARM")
|
||||
return `${name} ${release()} (${process.arch}${emulated ? ", emulated on ARM64" : ""})`
|
||||
}
|
||||
|
||||
export function describeTerminal() {
|
||||
|
||||
Reference in New Issue
Block a user