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

Return non-zero exit code in case of failure

Open BasPH opened this issue 2 years ago • 0 comments

A user tried adding an invalid variable which printed a message, but still returned exit code 0 (i.e. success):

astro deployment variable create --deployment-id clgyk4gke788834jup3l397f9d "dfasasgsagasgsafsgs cac ccccccc c"
Input dfasasgsagasgsafsgs cac ccccccc c is not a valid key value pair, should be of the form key=value

Besides printing an error message, we should also exit with a non-zero exit code, e.g. to ease automated usage of the CLI.

What CLI Version did you experience this bug?

This CLI bug is related to which Astronomer Platform?

  • [x] Astro
  • [ ] Software
  • [ ] None/Unknown

What Operating System is the above CLI installed on?

🪜 Steps To Reproduce

📸 Screenshots

BasPH avatar Apr 28 '23 07:04 BasPH