aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src
diff options
context:
space:
mode:
authorF. Eugene Aumson <gene@aumson.org>2018-08-17 01:29:36 +0800
committerF. Eugene Aumson <gene@aumson.org>2018-08-17 01:29:36 +0800
commit6b6b368bf6b3d9c6f69d47a2f304919c7e1c6ae1 (patch)
tree3724312d01c67676b4b8a9b8db6c1e88077cd8e5 /packages/sol-compiler/src
parentbadcb35525a4ccd5c80b7ad79288b267b961faef (diff)
downloaddexon-sol-tools-6b6b368bf6b3d9c6f69d47a2f304919c7e1c6ae1.tar
dexon-sol-tools-6b6b368bf6b3d9c6f69d47a2f304919c7e1c6ae1.tar.gz
dexon-sol-tools-6b6b368bf6b3d9c6f69d47a2f304919c7e1c6ae1.tar.bz2
dexon-sol-tools-6b6b368bf6b3d9c6f69d47a2f304919c7e1c6ae1.tar.lz
dexon-sol-tools-6b6b368bf6b3d9c6f69d47a2f304919c7e1c6ae1.tar.xz
dexon-sol-tools-6b6b368bf6b3d9c6f69d47a2f304919c7e1c6ae1.tar.zst
dexon-sol-tools-6b6b368bf6b3d9c6f69d47a2f304919c7e1c6ae1.zip
consolidate binPaths... ref's into fullSolcVersion
Diffstat (limited to 'packages/sol-compiler/src')
-rw-r--r--packages/sol-compiler/src/compiler.ts4
1 files changed, 2 insertions, 2 deletions
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);