diff --git a/scripts/commands/playlist/test.ts b/scripts/commands/playlist/test.ts index a5add7cb68..777c19f8d8 100644 --- a/scripts/commands/playlist/test.ts +++ b/scripts/commands/playlist/test.ts @@ -164,10 +164,14 @@ function onFinish(error) { drawTable() - console.log(chalk.red(`\n${errors + warnings} problems (${errors} errors, ${warnings} warnings)`)) + if (errors > 0 || warnings > 0) { + console.log( + chalk.red(`\n${errors + warnings} problems (${errors} errors, ${warnings} warnings)`) + ) - if (errors > 0) { - process.exit(1) + if (errors > 0) { + process.exit(1) + } } process.exit(0) diff --git a/scripts/commands/playlist/validate.ts b/scripts/commands/playlist/validate.ts index e089f7eff8..f1f7742eb9 100644 --- a/scripts/commands/playlist/validate.ts +++ b/scripts/commands/playlist/validate.ts @@ -109,16 +109,18 @@ async function main() { } } - console.log( - chalk.red( - `\n${ - errors.count() + warnings.count() - } problems (${errors.count()} errors, ${warnings.count()} warnings)` + if (errors.count() || warnings.count()) { + console.log( + chalk.red( + `\n${ + errors.count() + warnings.count() + } problems (${errors.count()} errors, ${warnings.count()} warnings)` + ) ) - ) - if (errors.count()) { - process.exit(1) + if (errors.count()) { + process.exit(1) + } } }