From 927ccc489c8cd69723bb2b13f81de150d7b255d0 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 11 Jun 2018 10:28:30 -0700 Subject: Fix a bug in SolCompilerArtifacts adapter config overriding --- .../sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts b/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts index 0be661106..051782ba4 100644 --- a/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts +++ b/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts @@ -20,11 +20,11 @@ export class SolCompilerArtifactAdapter extends AbstractArtifactAdapter { if (_.isUndefined(artifactsPath) && _.isUndefined(config.artifactsDir)) { throw new Error(`artifactsDir not found in ${CONFIG_FILE}`); } - this._artifactsPath = config.artifactsDir; + this._artifactsPath = artifactsPath || config.artifactsDir; if (_.isUndefined(sourcesPath) && _.isUndefined(config.contractsDir)) { throw new Error(`contractsDir not found in ${CONFIG_FILE}`); } - this._sourcesPath = config.contractsDir; + this._sourcesPath = sourcesPath || config.contractsDir; } public async collectContractsDataAsync(): Promise { const artifactsGlob = `${this._artifactsPath}/**/*.json`; -- cgit