Merge pull request #430 from embark-framework/bug_fix/dev-early-return-no-sol

Early return if no sol files Dev
This commit is contained in:
Iuri Matias 2018-05-17 10:15:21 -04:00 committed by GitHub
commit be0da47c54
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;
});
compiler.call(compiler, matchingFiles || [], function (err, compileResult) {
if (!matchingFiles || !matchingFiles.length) {
return callback();
}
compiler.call(compiler, matchingFiles, function (err, compileResult) {
Object.assign(compiledObject, compileResult);
callback(err, compileResult);
});

View File

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