From 199baacfd563bd695cc60312200d61636ddbb21e Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Wed, 15 Nov 2023 10:23:57 +0100 Subject: [PATCH] Improved error message for `yarn dev` refs https://github.com/TryGhost/DevOps/issues/104 - added colors and better messages to help when the script fails --- .github/scripts/dev.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/scripts/dev.js b/.github/scripts/dev.js index f713f0b69e..c7062494f6 100644 --- a/.github/scripts/dev.js +++ b/.github/scripts/dev.js @@ -214,6 +214,10 @@ async function handleStripe() { try { await result; } catch (err) { - console.error('\nExecuting dev command failed, ensure dependencies are up-to-date by running `yarn fix`\n'); + console.error(); + console.error(chalk.red(`Executing dev command failed:`) + `\n`); + console.error(chalk.red(`If you've recently done a \`yarn main\`, dependencies might be out of sync. Try running \`${chalk.green('yarn fix')}\` to fix this.`)); + console.error(chalk.red(`If not, something else went wrong. Please report this to the Ghost team.`)); + console.error(); } })();