From 6b6b368bf6b3d9c6f69d47a2f304919c7e1c6ae1 Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Thu, 16 Aug 2018 10:29:36 -0700 Subject: consolidate binPaths... ref's into fullSolcVersion --- packages/sol-compiler/src/compiler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/sol-compiler/src/compiler.ts') diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts index 390c2412a..1af11dcd0 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -85,10 +85,10 @@ export class Compiler { private static async _getSolcAsync( solcVersion: string, ): Promise<{ solcInstance: solc.SolcInstance; fullSolcVersion: string }> { - if (_.isUndefined(binPaths[solcVersion])) { + const fullSolcVersion = binPaths[solcVersion]; + if (_.isUndefined(fullSolcVersion)) { throw new Error(`${solcVersion} is not a known compiler version`); } - const fullSolcVersion = binPaths[solcVersion]; const compilerBinFilename = path.join(SOLC_BIN_DIR, fullSolcVersion); let solcjs: string; const isCompilerAvailableLocally = fs.existsSync(compilerBinFilename); -- cgit v1.2.3