aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-compiler')
-rw-r--r--packages/sol-compiler/src/cli.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/sol-compiler/src/cli.ts b/packages/sol-compiler/src/cli.ts
index 90b4949bc..71bb80c7d 100644
--- a/packages/sol-compiler/src/cli.ts
+++ b/packages/sol-compiler/src/cli.ts
@@ -27,14 +27,16 @@ const SEPARATOR = ',';
})
.option('contracts', {
type: 'string',
- default: DEFAULT_CONTRACTS_LIST,
description: 'comma separated list of contracts to compile',
})
.help().argv;
+ const contracts = _.isUndefined(argv.contracts)
+ ? undefined
+ : argv.contracts === DEFAULT_CONTRACTS_LIST ? DEFAULT_CONTRACTS_LIST : argv.contracts.split(SEPARATOR);
const opts: CompilerOptions = {
contractsDir: argv.contractsDir,
artifactsDir: argv.artifactsDir,
- contracts: argv.contracts === DEFAULT_CONTRACTS_LIST ? DEFAULT_CONTRACTS_LIST : argv.contracts.split(SEPARATOR),
+ contracts,
};
const compiler = new Compiler(opts);
await compiler.compileAsync();