zarf-dev / zarf

DevSecOps for Air Gap & Limited-Connection Systems. https://zarf.dev/
Apache License 2.0
1.41k stars 171 forks source link

Confusing error message when removing a component without --confirm #926

Open Racer159 opened 2 years ago

Racer159 commented 2 years ago

Environment

Device and OS: System76 popOS 22.04 App version: v0.22.1 Kubernetes distro being used: k3d Other: N/A

Steps to reproduce

  1. Init a cluster and deploy a package
  2. Run zarf package remove for that package without --confirm

Expected result

A red message that is obvious for why it failed

Actual Result

The help message with an error printed in white

Visual Proof (screenshots, videos, text, etc)

image

Severity/Priority

Low

Additional Context

Also a messaging bug that could be helped by the language file work

Madeline-UX commented 2 years ago

@Racer159 - Language that both explains the error and then shows the correct command? I have seen something like this in a CLI before

Looks like. you are trying to remove a package. Be sure to add -- confirm to the command. Try this [correct command]

Racer159 commented 2 years ago

Yes something like that, or more highlighting of the message that exists already. Initially I didn't notice it since it printed the help information again which was confusing initially. In my experience commands will do this sometimes but only in explicit scenarios. Usually if they know what you did wrong they will say only that without printing the rest of it. Here is how apt does it:

image

Madeline-UX commented 2 years ago

@Racer159 I think given that Ashton (deployer) will have limited CLI experience, adding one more line that suggest what to try instead is worth it. Thoughts?

JoeHCQ1 commented 2 months ago

Note this is partially resolved at this point:

image

That said, as a newcomer it was still confusing that it said the "confirm flag" without clarifying "try: --confirm".

There's a bit of guesswork involved in concluding that the "confirm flag" is "--confirm".