diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-11 00:26:44 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-11 00:26:44 +0800 |
commit | 1137abfd33f8f5a4deb9f55b21f45afd1b3d0b42 (patch) | |
tree | a4772fb584d2d3bb73e258ece6750036ea26e1b8 /packages | |
parent | e972ed8456b4e98af649b0e7878693322ed94a90 (diff) | |
download | dexon-sol-tools-1137abfd33f8f5a4deb9f55b21f45afd1b3d0b42.tar dexon-sol-tools-1137abfd33f8f5a4deb9f55b21f45afd1b3d0b42.tar.gz dexon-sol-tools-1137abfd33f8f5a4deb9f55b21f45afd1b3d0b42.tar.bz2 dexon-sol-tools-1137abfd33f8f5a4deb9f55b21f45afd1b3d0b42.tar.lz dexon-sol-tools-1137abfd33f8f5a4deb9f55b21f45afd1b3d0b42.tar.xz dexon-sol-tools-1137abfd33f8f5a4deb9f55b21f45afd1b3d0b42.tar.zst dexon-sol-tools-1137abfd33f8f5a4deb9f55b21f45afd1b3d0b42.zip |
Fix a bug in compiler config precedence
Diffstat (limited to 'packages')
-rw-r--r-- | packages/sol-compiler/src/cli.ts | 6 |
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(); |