fix duplicate dependencies and warn correctly for length

This commit is contained in:
Jonathan Rainville 2018-07-12 10:23:24 -04:00 committed by Pascal Precht
parent 15159e4ef3
commit 31162882c7
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 3 additions and 0 deletions

View File

@ -230,6 +230,9 @@ class ContractDeployer {
if (linkReference.length > 40) { 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}))); 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); let toReplace = linkReference + "_".repeat(40 - linkReference.length);
if (deployedAddress === undefined) { if (deployedAddress === undefined) {
let libraryName = contractObj.className; let libraryName = contractObj.className;