Skip to content

Commit

Permalink
fix(plugin): allow no package.json
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Gurtzick <[email protected]>
  • Loading branch information
wzrdtales committed Jun 8, 2019
1 parent fae85cf commit f27dce0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
);
Expand Down

0 comments on commit f27dce0

Please sign in to comment.