Skip to content

Commit 6de8aa4

Browse files
committed
fix(CLI): loosen regex for identifying MainApplication.kt in RN 0.82 during init command
1 parent 97ce47f commit 6de8aa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/commands/initCommand/initAndroid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function modifyMainApplicationKt(mainApplicationContent: string) {
4444
}
4545

4646
function addJsBundleFilePathArgument(mainApplicationContent: string) {
47-
const packageListArgumentPattern = /(packageList\s*=\s*\n\s*PackageList\(this\)[\s\S]+?\},\s*\n)/;
47+
const packageListArgumentPattern = /(packageList\s*=\s*\n\s*PackageList\(this\)[\s\S]+?\},?\s*\n)/;
4848

4949
if (!packageListArgumentPattern.test(mainApplicationContent)) {
5050
console.log('log: Could not find packageList argument while updating MainApplication.kt.');

0 commit comments

Comments
 (0)