Skip to content

Commit

Permalink
fix: support installing platfrom from local git checkout (#1453)
Browse files Browse the repository at this point in the history
  • Loading branch information
erisu authored Jun 30, 2022
1 parent 861fec2 commit e968cac
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit e968cac

Please sign in to comment.