Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
Merge pull request #6 from streamich/feat-various
Browse files Browse the repository at this point in the history
fix: πŸ› fix: don't fail if config missing in package.json
  • Loading branch information
streamich committed Jun 18, 2018
2 parents 60787d2 + a4a010d commit c0e4ca8
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions lib/getConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ const findOverrides = (root) => {
const pkgFilename = path.join(dir, 'package.json');

if (fs.existsSync(pkgFilename)) {
const changelog = require(pkgFilename).config.commitizen.changelog;

if (changelog) {
return changelog;
}
} else {
signale.error('package.json not found, at ' + pkgFilename);
try {
const changelog = require(pkgFilename).config.commitizen.changelog;

if (changelog) {
return changelog;
}
// eslint-disable-next-line no-empty
} catch (error) {}
}

return {};
Expand Down

0 comments on commit c0e4ca8

Please sign in to comment.