Filtering duplicated contracts dirs
This commit is contained in:
parent
21d65e8f8c
commit
98890beb46
|
@ -5,7 +5,6 @@ const path = require('path');
|
||||||
|
|
||||||
function compileSolcContract(logger, filename, allowedDirectories, callback) {
|
function compileSolcContract(logger, filename, allowedDirectories, callback) {
|
||||||
const command = `solc --optimize --combined-json abi,bin,bin-runtime,compact-format,hashes,interface,metadata --allow-paths ${allowedDirectories.join(',')} ${filename}`;
|
const command = `solc --optimize --combined-json abi,bin,bin-runtime,compact-format,hashes,interface,metadata --allow-paths ${allowedDirectories.join(',')} ${filename}`;
|
||||||
console.log(command);
|
|
||||||
shelljs.exec(command,
|
shelljs.exec(command,
|
||||||
{silent: true}, (code, stdout, stderr) => {
|
{silent: true}, (code, stdout, stderr) => {
|
||||||
|
|
||||||
|
@ -43,7 +42,8 @@ function compileSolc(embark, contractFiles, cb) {
|
||||||
|
|
||||||
logger.info("compiling solidity contracts with command line solc...");
|
logger.info("compiling solidity contracts with command line solc...");
|
||||||
|
|
||||||
const allowedDirectories = contractFiles.map((contractFile) => path.dirname(path.join(process.cwd(), contractFile.path)));
|
const allowedDirectories = contractFiles.map((contractFile) => path.dirname(path.join(process.cwd(), contractFile.path)))
|
||||||
|
.filter((x, i, a) => a.indexOf(x) == i);
|
||||||
|
|
||||||
let compiled_object = {};
|
let compiled_object = {};
|
||||||
async.each(contractFiles,
|
async.each(contractFiles,
|
||||||
|
|
Loading…
Reference in New Issue