diff --git a/lib/contracts/compiler.js b/lib/contracts/compiler.js index fa474e523..8699b842c 100644 --- a/lib/contracts/compiler.js +++ b/lib/contracts/compiler.js @@ -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; diff --git a/lib/contracts/deploy.js b/lib/contracts/deploy.js index d1b87ade3..7cfb7b16e 100644 --- a/lib/contracts/deploy.js +++ b/lib/contracts/deploy.js @@ -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);