bugfix(@embark/core): remove contracts from path which was causing getting contracts from npm packages not to work

This commit is contained in:
Iuri Matias 2019-12-12 14:45:12 -05:00
parent c00511a0e2
commit b25ade64f0

View File

@ -72,7 +72,7 @@ const buildNewFile = (file: File, importPath: string) => {
// imported from node_modules, ie import "@aragon/os/contracts/acl/ACL.sol"
if (isUnresolvedNodeModule(importPath)) {
from = resolve(importPath);
to = importPath.includes(dappPath(".embark")) ? importPath : dappPath(".embark", "contracts", "node_modules", importPath);
to = importPath.includes(dappPath(".embark")) ? importPath : dappPath(".embark", "node_modules", importPath);
if (from !== to) {
fs.copySync(from, to);
}