fix: embed instructions files & show error during show sdk step#174
Merged
Conversation
k3llymariee
commented
Apr 12, 2024
|
|
||
| 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) |
Contributor
Author
There was a problem hiding this comment.
added the footer view here as well
| PaddingRight(2) | ||
|
|
||
| h := help.New() | ||
| h.ShowAll = true |
Contributor
Author
There was a problem hiding this comment.
only showing full help when showing the instructions
Comment on lines
+9
to
+11
| //go:embed sdk_instructions/*.md | ||
| var InstructionFiles embed.FS | ||
|
|
|
Do we have to run 'go generate' or something similar now? |
sunnyguduru
approved these changes
Apr 15, 2024
dbolson
approved these changes
Apr 15, 2024
Contributor
Author
nope shouldn't have to! |
This was referenced Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.