From fcffd62bad8373ecd09692cf55d79ab588d552be Mon Sep 17 00:00:00 2001 From: Artyom Stepanishchev Date: Fri, 23 Nov 2018 12:23:49 +0300 Subject: [PATCH] fix: Added warning on plugin loading failure To get better DX Signed-off-by: Artyom Stepanishchev --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index f2eee0fe..dd5ea663 100644 --- a/index.js +++ b/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; @@ -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);