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

[v2.8] Fix panic on context switch #388

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

enrichman
Copy link
Contributor

@enrichman enrichman commented Sep 4, 2024

Ref: rancher/rancher#46933


Switching an empty context will cause a panic.

Added an ErrNoServerSelected error on the FocusedServer() func to force the check of a valid focused server.

* added bool check for missing focused server, fixed panic

* added main branch to FOSSA workflow

* return error instead of bool
@enrichman enrichman merged commit 8d82a95 into rancher:v2.8 Sep 4, 2024
1 check passed
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.

[2.8] Rancher CLI panics when we try to switch context without any selection
4 participants