Merge pull request #429 from embark-framework/bug_fix/no-sol

Early return if no sol files
This commit is contained in:
Iuri Matias 2018-05-17 10:15:16 -04:00 committed by GitHub
commit a2d7583dab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -32,7 +32,10 @@ class Compiler {
return false; return false;
}); });
compiler.call(compiler, matchingFiles || [], function (err, compileResult) { if (!matchingFiles || !matchingFiles.length) {
return callback();
}
compiler.call(compiler, matchingFiles, function (err, compileResult) {
Object.assign(compiledObject, compileResult); Object.assign(compiledObject, compileResult);
callback(err, compileResult); callback(err, compileResult);
}); });

View File

@ -12,6 +12,9 @@ class Solidity {
} }
compile_solidity(contractFiles, cb) { compile_solidity(contractFiles, cb) {
if (!contractFiles.length) {
return cb();
}
let self = this; let self = this;
let input = {}; let input = {};
let solcW; let solcW;