diff options
Diffstat (limited to 'packages/deployer/src/compiler.ts')
-rw-r--r-- | packages/deployer/src/compiler.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/deployer/src/compiler.ts b/packages/deployer/src/compiler.ts index 4e5518d0e..beeda1260 100644 --- a/packages/deployer/src/compiler.ts +++ b/packages/deployer/src/compiler.ts @@ -139,6 +139,7 @@ export class Compiler { const contractName = path.basename(contractBaseName, SOLIDITY_FILE_EXTENSION); const currentArtifactPath = `${this._artifactsDir}/${contractName}.json`; const sourceHash = `0x${ethUtil.sha3(source).toString('hex')}`; + const isContractSpecified = this._contractsToCompile.has(ALL_CONTRACTS_IDENTIFIER) || this._contractsToCompile.has(contractName); let currentArtifactString: string; let currentArtifact: ContractArtifact; @@ -156,9 +157,9 @@ export class Compiler { (_.isUndefined(oldNetwork) || oldNetwork.keccak256 !== sourceHash || oldNetwork.optimizer_enabled !== this._optimizerEnabled) && - (this._contractsToCompile.has(ALL_CONTRACTS_IDENTIFIER) || this._contractsToCompile.has(contractName)); + isContractSpecified; } catch (err) { - shouldCompile = true; + shouldCompile = isContractSpecified; } if (!shouldCompile) { |