mirror of https://github.com/embarklabs/embark.git
add error for reference issues
This commit is contained in:
parent
cfaccb307b
commit
68886d7095
|
@ -115,6 +115,9 @@ class Deploy {
|
||||||
deployedAddress = deployedAddress.substr(2);
|
deployedAddress = deployedAddress.substr(2);
|
||||||
}
|
}
|
||||||
let linkReference = '__' + filename + ":" + contractObj.className;
|
let linkReference = '__' + filename + ":" + contractObj.className;
|
||||||
|
if (linkReference.length > 40) {
|
||||||
|
return callback(new Error(linkReference + " is too long, try reducing the path of the contract (" + filename + ") and/or its name " + contractObj.className));
|
||||||
|
}
|
||||||
let toReplace = linkReference + "_".repeat(40 - linkReference.length);
|
let toReplace = linkReference + "_".repeat(40 - linkReference.length);
|
||||||
if (contractCode.indexOf(linkReference) >= 0 && deployedAddress === undefined) {
|
if (contractCode.indexOf(linkReference) >= 0 && deployedAddress === undefined) {
|
||||||
let libraryName = contractObj.className;
|
let libraryName = contractObj.className;
|
||||||
|
|
Loading…
Reference in New Issue