diff --git a/index.js b/index.js index 34478ece..1a33a5b3 100644 --- a/index.js +++ b/index.js @@ -6,6 +6,12 @@ var log = require('db-migrate-shared').log; exports.dataType = require('db-migrate-shared').dataType; function loadPluginList (options) { + try { + fs.accessSync(path.join(options.cwd, 'package.json'), fs.constants.R_OK); + } catch (err) { + return {}; + } + var plugins = JSON.parse( fs.readFileSync(path.join(options.cwd, 'package.json'), 'utf-8') );