fix afterDeploy not done and also waits for file build

This commit is contained in:
Jonathan Rainville 2018-06-14 10:30:34 -04:00
parent 15d9710b00
commit faaefd349c
1 changed files with 8 additions and 1 deletions

View File

@ -202,13 +202,20 @@ class Embark {
engine.deployManager.deployContracts(function (err) {
callback(err);
});
},
function waitForWriteFinish(callback) {
engine.logger.info("Finished deploying".underline);
// Necessary log for simple projects. This event is trigger to soon because there is no file
// Also, not exiting straight after the deploy leaves time for async afterDeploys to finish
engine.logger.info("If you have no files to build, you can exit now with CTRL+C");
engine.events.on('outputDone', callback);
}
], function (err, _result) {
if (err) {
engine.logger.error(err.message);
engine.logger.debug(err.stack);
} else {
engine.logger.info("finished building".underline);
engine.logger.info("Finished building".underline);
}
// needed due to child processes
process.exit();