fix(coverage): fix coverage regex on Windows

This commit is contained in:
Jonathan Rainville 2019-02-21 13:12:59 -05:00 committed by Iuri Matias
parent 84d4f3a252
commit 5e9955e828
2 changed files with 3 additions and 3 deletions

View File

@ -543,7 +543,6 @@ class ENS {
}
], (err) => {
self.configured = true;
console.log('all done');
if (err && err !== NO_REGISTRATION) {
self.logger.error('Error while deploying ENS contracts');
self.logger.error(err.message || err);

View File

@ -162,7 +162,7 @@ class Solidity {
let self = this;
let input = {};
let originalFilepath = {};
async.waterfall([
function prepareInput(callback) {
async.each(contractFiles,
@ -170,12 +170,13 @@ class Solidity {
let filename = file.path;
for (let directory of self.embark.config.contractDirectories) {
directory = directory.replace(/\\/g, '/');
let match = new RegExp("^" + directory);
filename = filename.replace(match, '');
}
originalFilepath[filename] = file.path;
file.prepareForCompilation(options.isCoverage)
.then(fileContent => {
input[file.path] = {content: fileContent.replace(/\r\n/g, '\n')};