aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-03-09 22:28:31 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-03-12 10:37:28 +0800
commit2c501d23807c5f446132fd8c984a16ad1069ebb3 (patch)
tree9b6f22f5f80f23a2eaf3ae03026811b1dc0e3058 /packages/deployer
parent3787e4a83cec8078388e5d6cfadd45652dbbbd7c (diff)
downloaddexon-sol-tools-2c501d23807c5f446132fd8c984a16ad1069ebb3.tar
dexon-sol-tools-2c501d23807c5f446132fd8c984a16ad1069ebb3.tar.gz
dexon-sol-tools-2c501d23807c5f446132fd8c984a16ad1069ebb3.tar.bz2
dexon-sol-tools-2c501d23807c5f446132fd8c984a16ad1069ebb3.tar.lz
dexon-sol-tools-2c501d23807c5f446132fd8c984a16ad1069ebb3.tar.xz
dexon-sol-tools-2c501d23807c5f446132fd8c984a16ad1069ebb3.tar.zst
dexon-sol-tools-2c501d23807c5f446132fd8c984a16ad1069ebb3.zip
Introduce isCompilerAvailableLocally
Diffstat (limited to 'packages/deployer')
-rw-r--r--packages/deployer/src/compiler.ts3
1 files changed, 2 insertions, 1 deletions
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}...`);