From 7c03b5fceb462de5dc889cd0e9a89bfe67e7b891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20K=C3=A4mmerling?= Date: Thu, 16 Jul 2020 06:37:52 +0200 Subject: [PATCH] Fix context list nil pointer when no active context was given. --- cli/context_list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/context_list.go b/cli/context_list.go index 3242fa53..8cec5522 100644 --- a/cli/context_list.go +++ b/cli/context_list.go @@ -57,7 +57,7 @@ func runContextList(cli *CLI, cmd *cobra.Command, args []string) error { Token: context.Token, Active: " ", } - if cli.Config.ActiveContext.Name == context.Name { + if cli.Config.ActiveContext != nil && cli.Config.ActiveContext.Name == context.Name { presentation.Active = "*" }