Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit a06f2c6

Browse files
fix for issue #968 #974
1 parent c76e1bc commit a06f2c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/scripts/postinstall.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3596,7 +3596,7 @@ module.exports = function($logger, $projectData, hookArgs) {
35963596
var platform = hookArgs['checkForChangesOpts']['platform'].toLowerCase(); // ios | android
35973597
var platformsDir = hookArgs['checkForChangesOpts']['projectData']['platformsDir'];
35983598
var appResourcesDirectoryPath = hookArgs['checkForChangesOpts']['projectData']['appResourcesDirectoryPath'];
3599-
var forcePrepare = true; // whether to force NS to run prepare
3599+
var forcePrepare = true; // whether to force NS to run prepare, defaults to true
36003600
var npfInfoPath = path.join(platformsDir, platform, ".pluginfirebaseinfo");
36013601
var nsPrepareInfoPath = path.join(platformsDir, platform, ".nsprepareinfo");
36023602
var copyPlistOpts = { platform, appResourcesDirectoryPath, buildType, $logger }
@@ -3616,10 +3616,10 @@ module.exports = function($logger, $projectData, hookArgs) {
36163616
$logger.info('nativescript-plugin-firebase: running release build or change in environment detected, forcing prepare!');
36173617
36183618
if (fs.existsSync(npfInfoPath)) { fs.unlinkSync(npfInfoPath); }
3619-
fs.unlinkSync(nsPrepareInfoPath);
3619+
if (fs.existsSync(nsPrepareInfoPath)) { fs.unlinkSync(nsPrepareInfoPath); }
36203620
36213621
if (copyPlist(copyPlistOpts)) { resolve(); } else { reject(); }
3622-
} else { if (copyPlist(copyPlistOpts)) { resolve(); } else { reject(); } }
3622+
} else { resolve(); }
36233623
});
36243624
};
36253625

0 commit comments

Comments
 (0)