You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2022/06/30 12:35:32 UTC
[cordova-android] branch master updated: fix: support installing platfrom from local git checkout (#1453)
This is an automated email from the ASF dual-hosted git repository.
erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-android.git
The following commit(s) were added to refs/heads/master by this push:
new e968cac0 fix: support installing platfrom from local git checkout (#1453)
e968cac0 is described below
commit e968cac0b93f6f7115c5b853a8922d19fd731160
Author: エリス <er...@users.noreply.github.com>
AuthorDate: Thu Jun 30 21:35:27 2022 +0900
fix: support installing platfrom from local git checkout (#1453)
---
lib/prepare.js | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/lib/prepare.js b/lib/prepare.js
index bb97c400..a082bf2d 100644
--- a/lib/prepare.js
+++ b/lib/prepare.js
@@ -553,9 +553,17 @@ function updateProjectSplashScreenImage (locations, themeKey, cdvConfigPrefKey,
let possiblePreviousDestFilePath = path.join(destPngDir, destFileName + '.png');
// Default Drawable Source File
- const defaultSrcFilePath = themeKey !== 'windowSplashScreenBrandingImage'
- ? require.resolve('cordova-android/templates/project/res/drawable/' + destFileNameExt)
- : null;
+ let defaultSrcFilePath = null;
+
+ if (themeKey !== 'windowSplashScreenBrandingImage') {
+ try {
+ // coming from user project
+ defaultSrcFilePath = require.resolve('cordova-android/templates/project/res/drawable/' + destFileNameExt);
+ } catch (e) {
+ // coming from repo test & coho
+ defaultSrcFilePath = require.resolve('../templates/project/res/drawable/' + destFileNameExt);
+ }
+ }
if (!cdvConfigPrefValue || !fs.existsSync(cdvConfigPrefValue)) {
let emitType = 'verbose';
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org