-
-
Notifications
You must be signed in to change notification settings - Fork 37
fix(cli): Normalize Linux ARM64 arch name for sentry-cli binary lookup #1201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
ae240b3
5329dd3
639f75c
8fa7ddf
1661a7e
25139c1
fc4356a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -133,8 +133,18 @@ internal object SentryCliProvider { | |
| val osName = System.getProperty("os.name").toLowerCase(Locale.ROOT) | ||
| val osArch = System.getProperty("os.arch") | ||
| return when { | ||
| "mac" in osName -> "Darwin-universal" | ||
| "linux" in osName -> if (osArch == "amd64") "Linux-x86_64" else "Linux-$osArch" | ||
| "mac" in osName -> if (osArch == "aarch64") "Darwin-arm64" else "Darwin-x86_64" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. macOS omits arm64 arch aliasMedium Severity In Reviewed by Cursor Bugbot for commit 25139c1. Configure here. |
||
| "linux" in osName -> { | ||
| val normalizedArch = | ||
| when (osArch) { | ||
| "amd64", | ||
| "x86_64" -> "x86_64" | ||
| "arm64", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isn't arm64 and aarch64 two separate binaries? |
||
| "aarch64" -> "aarch64" | ||
| else -> osArch | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what about i686? Does that fall under else? |
||
| } | ||
| "Linux-$normalizedArch" | ||
| } | ||
| "win" in osName -> "Windows-i686.exe" | ||
| else -> null | ||
| } | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The architecture check for Apple Silicon is incomplete. It only checks for
"aarch64"while native ARM JVMs report"arm64", causing the wrong binary to be selected.Severity: HIGH
Suggested Fix
Update the condition to handle both
"aarch64"and"arm64"for macOS, similar to how it's handled for Linux and Windows. Changeif (osArch == "aarch64")toif (osArch == "aarch64" || osArch == "arm64").Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.