astro-cli icon indicating copy to clipboard operation
astro-cli copied to clipboard

Change Error Message Color to Red for `astro dev` Commands when Running from non-Astro Directory

Open alex-astronomer opened this issue 2 years ago • 0 comments

  • [x] I have checked that a similar feature request does not already exist.

✍️ Is your feature request related to a problem? Please describe.

When running astro dev [stop|restart|start|...] in a directory that isn't an Astro repository, I receive the message

Error: this is not an Astro project directory.
Change to another directory or run astro dev init to turn your working directory into an Astro project

Then it displays the Usage for the command. I get confused because all of this is the same white color. It takes me a second for me to realize what went wrong.

🧩 Describe the solution you'd like

I'd like to see the Error message part in a different color than the Usage information that displays after in this case

🤔 Describe alternatives you've considered

Could also just add a new-line gap between to make it clear that there's two things happening in this case:

  • running in a different directory error
  • usage information printing

alex-astronomer avatar Feb 18 '23 12:02 alex-astronomer