fix: 'no diff' notice for diff command

pull/26/head
Boaz Poolman 2021-11-10 16:36:30 +01:00
parent 160ce5216a
commit f408122d82
1 changed files with 6 additions and 0 deletions

View File

@ -166,6 +166,12 @@ program
const app = await strapi().load(); const app = await strapi().load();
const diff = await app.plugin('config-sync').service('main').getFormattedDiff(); const diff = await app.plugin('config-sync').service('main').getFormattedDiff();
// No changes.
if (isEmpty(diff.diff)) {
console.log(`${chalk.cyan('[notice]')} There is no config diff, you are up to date.`);
process.exit(0);
}
// Init table. // Init table.
const table = initTable(); const table = initTable();