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

fix: embed instructions files & show error during show sdk step #174

Merged
merged 5 commits into from
Apr 16, 2024

Conversation

k3llymariee
Copy link
Contributor

@k3llymariee k3llymariee commented Apr 12, 2024

The new instruction files weren't readable from the binary, so now we are embedding them!

Also this error was getting swallowed, resulting in an infinite spinner, so if something goes wrong with reading the file (or fetching the env) we'll now surface that too.

image

if m.instructions == "" || m.environment == nil {
return m.spinner.View() + fmt.Sprintf(" Fetching %s SDK instructions...", m.displayName)
return m.spinner.View() + fmt.Sprintf(" Fetching %s SDK instructions...\n", m.displayName) + footerView(m.help.View(m.helpKeys), nil)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added the footer view here as well

@@ -63,7 +65,6 @@ func NewShowSDKInstructionsModel(
PaddingRight(2)

h := help.New()
h.ShowAll = true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only showing full help when showing the instructions

Comment on lines +9 to +11
//go:embed sdk_instructions/*.md
var InstructionFiles embed.FS

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main change

@k3llymariee k3llymariee marked this pull request as ready for review April 12, 2024 23:36
@k3llymariee k3llymariee requested review from dbolson and sunnyguduru and removed request for dbolson April 12, 2024 23:36
@sunnyguduru
Copy link
Contributor

Do we have to run 'go generate' or something similar now?

@k3llymariee
Copy link
Contributor Author

Do we have to run 'go generate' or something similar now?

nope shouldn't have to!

@k3llymariee k3llymariee merged commit ae07b46 into main Apr 16, 2024
3 checks passed
@k3llymariee k3llymariee deleted the kelly/return-error-during-show-sdk-step branch April 16, 2024 15:45
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.

3 participants