Skip to content

Commit

Permalink
fix: print out error when changelog fails
Browse files Browse the repository at this point in the history
  • Loading branch information
shipjs committed Apr 12, 2021
1 parent 6414240 commit d40b041
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/shipjs/src/step/prepare/updateChangelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,15 @@ export async function prepareParams({
args.config
);
} catch (err) {
/* eslint-disable no-console */
if (typeof args.preset === 'object') {
args.warn(`Preset: "${args.preset.name}" ${err.message}`);
console.error(`Preset: "${args.preset.name}" ${err.message}`);
} else if (typeof args.preset === 'string') {
args.warn(`Preset: "${args.preset}" ${err.message}`);
console.error(`Preset: "${args.preset}" ${err.message}`);
} else {
args.warn(`Preset: ${err.message}`);
console.error(`Preset: ${err.message}`);
}
/* eslint-enable no-console */
}
}

Expand Down

0 comments on commit d40b041

Please sign in to comment.