From 605b04593731fe5d27f40a2e135b608c41829f0f Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Tue, 4 Feb 2020 12:03:54 +0100 Subject: [PATCH] fix(cli): Avoid AndroidManifest.xml not found error on add (#2400) --- cli/src/cordova.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/src/cordova.ts b/cli/src/cordova.ts index 9698c5202..33eba0588 100644 --- a/cli/src/cordova.ts +++ b/cli/src/cordova.ts @@ -414,7 +414,9 @@ ${applicationXMLEntries.join('\n')} ${rootXMLEntries.join('\n')} `; content = content.replace(new RegExp(('$PACKAGE_NAME').replace('$', '\\$&'), 'g'), config.app.appId); - await writeFileAsync(manifestPath, content); + if (existsSync(manifestPath)) { + await writeFileAsync(manifestPath, content); + } } function getPathParts(path: string) {