finch icon indicating copy to clipboard operation
finch copied to clipboard

Improve error reporting user experience

Open DavidSouther opened this issue 1 year ago • 1 comments

What is the problem you're trying to solve?.

This error message is IMHO brusque and jarring:

% finch build -t rustv1
FATA[0000] context needs to be specified                
FATA[0000] exit status 1 

Compared to

% docker build -t rustv1
ERROR: "docker buildx build" requires exactly 1 argument.
See 'docker buildx build --help'.

Usage:  docker buildx build [OPTIONS] PATH | URL | -

Start a build

Describe the feature you'd like

While both contain the same specific issue, the "FATA[0000]" prefix feels very in-my-face for a minor typo? On the other hand, Docker's is probably too verbose? I know how to invoke --help. The Usage: line, though, is IMHO the nicety of their error output.

So I'd be interested in a general "Make the CLI output friendly" for the common operations (build, run, exec, etc).

DavidSouther avatar Jan 17 '24 17:01 DavidSouther

the "FATA[0000]" prefix feels very in-my-face for a minor typo?

No

https://pkg.go.dev/github.com/sirupsen/logrus#readme-formatters

When colors are enabled, levels are truncated to 4 characters by default.

AkihiroSuda avatar Feb 01 '24 03:02 AkihiroSuda