Skip to content

Commit

Permalink
fix(conventional-commits): Ensure potential ValidationError in `get…
Browse files Browse the repository at this point in the history
…ChangelogConfig()` is propagated correctly
  • Loading branch information
evocateur committed Nov 19, 2019
1 parent 563f995 commit 406ba5a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/conventional-commits/lib/recommend-version.js
Expand Up @@ -35,7 +35,11 @@ function recommendVersion(pkg, type, { changelogPreset, rootPath, tagPrefix, pre
}
};

return getChangelogConfig(changelogPreset, rootPath).then(config => {
// Ensure potential ValidationError in getChangelogConfig() is propagated correctly
let chain = Promise.resolve();

chain = chain.then(() => getChangelogConfig(changelogPreset, rootPath));
chain = chain.then(config => {
// "new" preset API
options.config = config;

Expand All @@ -61,4 +65,6 @@ function recommendVersion(pkg, type, { changelogPreset, rootPath, tagPrefix, pre
});
});
});

return chain;
}

0 comments on commit 406ba5a

Please sign in to comment.