-
-
Notifications
You must be signed in to change notification settings - Fork 475
Add support to ARM browsers #2937
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
Changes from all commits
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 |
---|---|---|
|
@@ -160,12 +160,16 @@ | |
|
||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) | ||
{ | ||
return RuntimeInformation.OSArchitecture == Architecture.X64 ? Platform.Win64 : Platform.Win32; | ||
return RuntimeInformation.OSArchitecture == Architecture.X64 || | ||
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. [nitpick] Consider introducing a dedicated Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback 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. not yet |
||
(RuntimeInformation.OSArchitecture == Architecture.Arm64 && IsWindows11()) ? Platform.Win64 : Platform.Win32; | ||
} | ||
|
||
return Platform.Unknown; | ||
} | ||
|
||
internal static bool IsWindows11() | ||
=> RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Environment.OSVersion.Version.Build >= 22000; | ||
|
||
internal static string GetBrowsersLocation() | ||
{ | ||
var assembly = typeof(Puppeteer).Assembly; | ||
|
@@ -174,7 +178,7 @@ | |
|
||
if (!assemblyDirectory.Exists || !File.Exists(Path.Combine(assemblyDirectory.FullName, assemblyName))) | ||
{ | ||
var assemblyLocation = assembly.Location; | ||
Check warning on line 181 in lib/PuppeteerSharp/BrowserFetcher.cs
|
||
|
||
if (string.IsNullOrEmpty(assemblyLocation)) | ||
{ | ||
|
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.
[nitpick] There's repeated grouping of
Platform.Linux
andPlatform.LinuxArm64
; consider extracting a helper (e.g.,IsLinuxPlatform
) or shared method to reduce duplication across switch statements.Copilot uses AI. Check for mistakes.
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.
nah