Skip to content

Commit 7afcde7

Browse files
authored
[0.79] Fix init-windows template default not set for telemetry purposes (#14751)
## Description This PR fixes the issue where telemetry reports the value of the template before it's calculated. ### Type of Change - Bug fix (non-breaking change which fixes an issue) ### Why The template default, when no option was provided, is calculated after telemetry records the value, so it was always blank in such cases. Resolves #14749 ### What Updated `initWindowsOptions` to include the current template default. ## Screenshots N/A ## Testing Verified the value appears in the debugger. ## Changelog Should this change be included in the release notes: _yes_ Fix `init-windows` template default not set for telemetry purposes
1 parent 47f187d commit 7afcde7

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "[0.79] Fix `init-windows` template default not set for telemetry purposes",
4+
"packageName": "@react-native-windows/cli",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

packages/@react-native-windows/cli/src/commands/initWindows/initWindowsOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const initOptions: CommandOption[] = [
2424
{
2525
name: '--template [string]',
2626
description: 'Specify the template to use',
27-
default: undefined,
27+
default: 'old/uwp-cpp-app',
2828
},
2929
{
3030
name: '--name [string]',

0 commit comments

Comments
 (0)