From 31162882c77f4388f22a4163b3942fd8130f1bd3 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Thu, 12 Jul 2018 10:23:24 -0400 Subject: [PATCH] fix duplicate dependencies and warn correctly for length --- lib/modules/deployment/contract_deployer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/modules/deployment/contract_deployer.js b/lib/modules/deployment/contract_deployer.js index ae97e002..b3b600b8 100644 --- a/lib/modules/deployment/contract_deployer.js +++ b/lib/modules/deployment/contract_deployer.js @@ -230,6 +230,9 @@ class ContractDeployer { if (linkReference.length > 40) { return next(new Error(__("{{linkReference}} is too long, try reducing the path of the contract ({{filename}}) and/or its name {{contractName}}", {linkReference: linkReference, filename: filename, contractName: contractObj.className}))); } + if (contractCode.indexOf(linkReference) < 0) { + continue; + } let toReplace = linkReference + "_".repeat(40 - linkReference.length); if (deployedAddress === undefined) { let libraryName = contractObj.className;