Fail fast

This commit is contained in:
Leonid Logvinov
2019-01-30 13:04:53 +01:00
parent 445a629016
commit c82a4a5760

View File

@@ -280,6 +280,9 @@ export class Compiler {
fullSolcVersion = binPaths[solcVersion];
compilerOutput = await compileSolcJSAsync(solcVersion, input.standardInput);
}
if (!_.isUndefined(compilerOutput.errors)) {
printCompilationErrorsAndWarnings(compilerOutput.errors);
}
compilerOutput.sources = makeContractPathsRelative(
compilerOutput.sources,
this._contractsDir,
@@ -290,9 +293,6 @@ export class Compiler {
this._contractsDir,
dependencyNameToPackagePath,
);
if (!_.isUndefined(compilerOutput.errors)) {
printCompilationErrorsAndWarnings(compilerOutput.errors);
}
for (const contractPath of input.contractsToCompile) {
const contractName = contractPathToData[contractPath].contractName;