Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve error message, since version is nil #191

Closed

Conversation

bschaatsbergen
Copy link
Member

@bschaatsbergen bschaatsbergen commented Apr 4, 2024

When hc-install looks for a release that we don't have binaries for (e.g. terraform 1.0.0 darwin/arm64), we print an error message containing a nil:

 $ ./hc-install install -version 1.0.0 terraform
hc-install: will install terraform@1.0.0
failed to install terraform@1.0.0: no ZIP archive found for terraform <nil> darwin/arm64

At first, I assumed there might be a bug in hc-install because of seeing that nil. After checking the Release index I noticed we started building darwin/arm64 binaries starting from 1.1.

I'm assuming that the nil is the result of marshaling the Release API response, which can't list the product and doesn't return a version?

This PR changes the error message to:

hc-install: will install terraform@1.0.0
failed to install terraform@1.0.0: darwin/arm64 ZIP archive for terraform not found

@bschaatsbergen
Copy link
Member Author

Closing this in favor of #192

@bschaatsbergen bschaatsbergen deleted the c/improve-err-message branch April 4, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant