Skip to content

Commit

Permalink
fix: preset load error message should handle objects
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Apr 11, 2019
1 parent b3416cb commit fb4a8d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/conventional-recommended-bump/index.js
Expand Up @@ -30,7 +30,8 @@ function conventionalRecommendedBump (optionsArgument, parserOptsArgument, cbArg
presetPackage = conventionalChangelogPresetLoader(options.preset)
} catch (err) {
if (err.message === 'does not exist') {
return cb(new Error(`Unable to load the "${options.preset}" preset package. Please make sure it's installed.`))
const preset = typeof options.preset === 'object' ? options.preset.name : options.preset
return cb(new Error(`Unable to load the "${preset}" preset package. Please make sure it's installed.`))
} else {
return cb(err)
}
Expand Down

0 comments on commit fb4a8d1

Please sign in to comment.