mirror of https://github.com/embarklabs/embark.git
Merge pull request #383 from embark-framework/no_contracts
don't error if it's an empty dapp with no contracts yet
This commit is contained in:
commit
6a3add8e04
|
@ -10,6 +10,10 @@ class Compiler {
|
|||
const self = this;
|
||||
let available_compilers = {};
|
||||
|
||||
if (contractFiles.length === 0) {
|
||||
return cb(null, {});
|
||||
}
|
||||
|
||||
let pluginCompilers = self.plugins.getPluginsProperty('compilers', 'compilers');
|
||||
pluginCompilers.forEach(function (compilerObject) {
|
||||
available_compilers[compilerObject.extension] = compilerObject.cb;
|
||||
|
|
|
@ -352,8 +352,9 @@ class Deploy {
|
|||
deployAll(done) {
|
||||
let self = this;
|
||||
this.logger.info("deploying contracts");
|
||||
let contracts = this.contractsManager.listContracts();
|
||||
|
||||
async.eachOfSeries(this.contractsManager.listContracts(),
|
||||
async.eachOfSeries(contracts,
|
||||
function (contract, key, callback) {
|
||||
self.logger.trace(arguments);
|
||||
self.checkAndDeployContract(contract, null, callback);
|
||||
|
@ -364,6 +365,10 @@ class Deploy {
|
|||
self.logger.error(err.message);
|
||||
self.logger.debug(err.stack);
|
||||
}
|
||||
if (contracts.length === 0) {
|
||||
self.logger.info("no contracts found");
|
||||
return done();
|
||||
}
|
||||
self.logger.info("finished deploying contracts");
|
||||
self.logger.trace(arguments);
|
||||
done(err);
|
||||
|
|
Loading…
Reference in New Issue