-
Notifications
You must be signed in to change notification settings - Fork 165
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 panic on context switch
#386
Conversation
context switch
45340 rancher cli panicscontext switch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have tests.
Yes, I agree. Not sure if having those just at the Next week there will be a discussion about the CLI, so if we will need to develop a bit more on it then we will have some time to clean up the code! |
* added bool check for missing focused server, fixed panic * added main branch to FOSSA workflow * return error instead of bool
* added bool check for missing focused server, fixed panic * added main branch to FOSSA workflow * return error instead of bool
* added bool check for missing focused server, fixed panic * added main branch to FOSSA workflow * return error instead of bool
* added bool check for missing focused server, fixed panic * added main branch to FOSSA workflow * return error instead of bool
Ref: rancher/rancher#45340
Switching an empty context will cause a panic.
Added an
ErrNoServerSelected
error on theFocusedServer()
func to force the check of a valid focused server.