diff --git a/src/Umbraco.Web.UI.Client/devops/circular/index.js b/src/Umbraco.Web.UI.Client/devops/circular/index.js index 107556b6ee..31223f1098 100644 --- a/src/Umbraco.Web.UI.Client/devops/circular/index.js +++ b/src/Umbraco.Web.UI.Client/devops/circular/index.js @@ -52,7 +52,12 @@ if (circular.length) { */ // TODO: Remove this check and set an exit with argument 1 when we have fixed all circular dependencies. - if (circular.length > 7) { + const MAX_CIRCULAR_DEPENDENCIES = 7; + if (circular.length > MAX_CIRCULAR_DEPENDENCIES) { + process.exit(1); + } else if (circular.length < MAX_CIRCULAR_DEPENDENCIES) { + console.error(`\nYou have fewer circular dependencies (${circular.length}) than anticipated (${MAX_CIRCULAR_DEPENDENCIES}). That is great!\n`); + console.error(`(Now please adjust the number in MAX_CIRCULAR_DEPENDENCIES to ${circular.length} in devops/circular/index.js).\n`); process.exit(1); } else { process.exit(0);