From 2c501d23807c5f446132fd8c984a16ad1069ebb3 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 9 Mar 2018 15:28:31 +0100 Subject: Introduce isCompilerAvailableLocally --- packages/deployer/src/compiler.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/deployer/src') diff --git a/packages/deployer/src/compiler.ts b/packages/deployer/src/compiler.ts index 82350d0b3..81d01b895 100644 --- a/packages/deployer/src/compiler.ts +++ b/packages/deployer/src/compiler.ts @@ -191,7 +191,8 @@ export class Compiler { const fullSolcVersion = binPaths[contractSpecificSourceData.solcVersion]; const compilerBinFilename = path.join(__dirname, '../../solc_bin', fullSolcVersion); let solcjs: string; - if (fs.existsSync(compilerBinFilename)) { + const isCompilerAvailableLocally = fs.existsSync(compilerBinFilename); + if (isCompilerAvailableLocally) { solcjs = fs.readFileSync(compilerBinFilename).toString(); } else { utils.consoleLog(`Downloading ${fullSolcVersion}...`); -- cgit v1.2.3