fix(golang-rewrite): print error message when app.Run fails#2228
fix(golang-rewrite): print error message when app.Run fails#2228teal-bauer wants to merge 3 commits into
Conversation
|
I cannot count the number of times I have accidentally run |
|
Ping @asdf-vm/core? |
Stratus3D
left a comment
There was a problem hiding this comment.
Hi @teal-bauer , thanks for the PR, unfortunately some of the existing tests are failing with these changes. It appears multiple errors are getting logged in some instances. I'll see if I can figure out what is going wrong.
|
Hi @Stratus3D, the local tests were green when I opened this PR in January, I think CI tests didn't run due to missing approval. Ping me if the forward merge doesn't resolve it - I see the workflows are still waiting for approval though. |
|
Thanks for the PR @teal-bauer ! This was very confusing behavior and I'm glad you reported this. When investigating this I found that |
|
Ah, interesting. Yeah, either way is fine with me, and having |
Summary
Previously, when
app.Run()returned an error (e.g.,asdf set -h foo 1.2.3), the CLI would exit with code 1 but print nothing, making it difficult to understand what went wrong.Now the error message is printed (e.g., "No help topic for 'foo'").
Test plan
asdf set -h foo 1.2.3now prints error messageasdf set -hstill shows help with exit code 0asdf set <tool> <version>still worksgo test ./internal/cli/...)