From 4d424c06b999b55f57a0a2238cd6c5da849b4949 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Thu, 14 Mar 2019 13:37:43 -0400 Subject: [PATCH] fix(embark/solidity): fix getting the original filename of contracts --- packages/embark/src/lib/modules/solidity/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/embark/src/lib/modules/solidity/index.js b/packages/embark/src/lib/modules/solidity/index.js index e830044ac..a861161ad 100644 --- a/packages/embark/src/lib/modules/solidity/index.js +++ b/packages/embark/src/lib/modules/solidity/index.js @@ -145,7 +145,8 @@ class Solidity { compiled_object[className].abiDefinition = contract.abi; compiled_object[className].userdoc = contract.userdoc; compiled_object[className].filename = filename; - compiled_object[className].originalFilename = originalFilepaths[path.basename(filename)]; + const normalized = path.normalize(filename); + compiled_object[className].originalFilename = Object.values(originalFilepaths).find(ogFilePath => normalized.indexOf(ogFilePath) > -1); } }