Skip to content

Commit

Permalink
[0.72] Fix os.arch for x86/arm64 (#11671)
Browse files Browse the repository at this point in the history
This PR backports #11659 to 0.72.

* Update runWindowsOptions.ts

os.arch returns ia32 and arm64 for x86 and ARM64 respectively

* Change files

* lint

* lint

Co-authored-by: Alexander Sklar <asklar@microsoft.com>
  • Loading branch information
jonthysell and asklar committed May 30, 2023
1 parent 0fe6db0 commit 40f82b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "[0.72] fix x86 node invocation",
"packageName": "@react-native-windows/cli",
"email": "asklar@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ export const runWindowsOptions: CommandOption[] = [
{
name: '--arch [string]',
description: 'The build architecture (ARM64, x86, x64)',
default: os.arch(),
default:
os.arch() === 'ia32'
? 'x86'
: os.arch() === 'arm64'
? 'ARM64'
: os.arch(),
parse: parseBuildArch,
},
{
Expand Down

0 comments on commit 40f82b1

Please sign in to comment.