Skip to content

Commit

Permalink
fix: Added warning on plugin loading failure
Browse files Browse the repository at this point in the history
To get better DX

Signed-off-by: Artyom Stepanishchev <artyom.stepanishchev@jazzpixels.com>
  • Loading branch information
Artyom Stepanishchev committed Nov 23, 2018
1 parent 120ee20 commit fcffd62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
@@ -1,6 +1,7 @@
require('pkginfo')(module, 'version'); // jshint ignore:line
var fs = require('fs');
var path = require('path');
var log = require('db-migrate-shared').log;

exports.dataType = require('db-migrate-shared').dataType;

Expand Down Expand Up @@ -53,7 +54,9 @@ module.exports.getInstance = function (isModule, options, callback) {

try {
if (!options || !options.noPlugins) plugins = loadPlugins();
} catch (ex) {}
} catch (ex) {
log.warn(ex);
}

if (options && options.plugins) {
plugins = Object.assign(plugins, options.plugins);
Expand Down

0 comments on commit fcffd62

Please sign in to comment.