Skip to content

Change OS-architecture check to work with other locales #3392

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

Merged

Conversation

mat-ocl
Copy link
Contributor

@mat-ocl mat-ocl commented Jun 2, 2021

Fixes #3390

PR Summary

Matching was done with literal equality check: -eq '64-bit'. This has been changed to Regex: -match '64'. This so it won't matter what the language of the OS is. For example this will match '64-bittinen', '64-bëssen'

PR Checklist

  • PR has a meaningful title
  • Summarized changes
  • [NA] PR has tests
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

@mat-ocl
Copy link
Contributor Author

mat-ocl commented Jun 2, 2021

Solves issue #3390

@rjmholt rjmholt changed the title Changed literal English check of OS-architecture to a regex that shou… Change OS-architecture check to work with other locales Jun 2, 2021
Copy link
Contributor

@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, how strange that this is localised...

Thanks for fixing this!

@rjmholt
Copy link
Contributor

rjmholt commented Jun 2, 2021

It does strike me that we should assume 64-bit and test for 32-bit, but that's a bigger change and this one should work in most cases so I'm happy to take this one as is

@andyleejordan andyleejordan enabled auto-merge (squash) June 2, 2021 17:42
@andyleejordan andyleejordan merged commit 742ae08 into PowerShell:master Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install-VSCode.ps1 not detecting 64-bit architechture in Windows 10
4 participants