fix: support installing platfrom from local git checkout (#1453)

This commit is contained in:
エリス 2022-06-30 21:35:27 +09:00 committed by GitHub
parent 861fec2cc7
commit e968cac0b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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';