diff --git a/index.js b/index.js index 6b67bd5..1df4759 100644 --- a/index.js +++ b/index.js @@ -77,7 +77,7 @@ function cli(argv) { //@ts-ignore if (!module.parent) { - cli(process.argv.slice(2).concat('--exit')); + cli(process.argv.slice(2).concat('--exit')).catch(e => console.error(e)); } module.exports = main; diff --git a/sources/mysql.js b/sources/mysql.js index 839bb16..a99e95a 100644 --- a/sources/mysql.js +++ b/sources/mysql.js @@ -6,7 +6,7 @@ module.exports = argv => { ['source_database', 'source_table'].forEach(key => { if(!argv[key]) throw `${key} missing`;}); argv.source_table = argv.source_database + '.' + argv.source_table; - const config = createConfig(argv.source_config, argv, 'target', ['host', 'connectionLimit', 'user', 'password']); + const config = createConfig(argv.source_config, argv, 'source', ['host', 'connectionLimit', 'user', 'password']); const pool = mysql.createPool(config); const p = etl.mysql.execute(pool);