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 context list nil pointer when no active context was given. #252

Merged
merged 1 commit into from
Jul 17, 2020

Conversation

LKaemmerling
Copy link
Member

Closes #248

When you run hcloud context delete <ActiveContextName> we set cli.Config.ActiveContext = nil (https://github.com/hetznercloud/cli/blob/master/cli/context_delete.go#L28). This leads in the hcloud context list to the problem that cli.Config.ActiveContextcan be nil, but we try to access the Name (https://github.com/hetznercloud/cli/blob/master/cli/context_list.go#L60)

@LKaemmerling LKaemmerling requested a review from LD250 July 16, 2020 04:41
@LKaemmerling LKaemmerling merged commit 5fc1464 into master Jul 17, 2020
@LKaemmerling LKaemmerling deleted the fix-context-list-nil-pointer branch July 17, 2020 06:57
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.

Unable to switch context between projects
2 participants