From 5fc1464eef2e3efafd420a30d9af81df08bf33dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20K=C3=A4mmerling?= Date: Fri, 17 Jul 2020 08:56:56 +0200 Subject: [PATCH] Fix context list nil pointer when no active context was given. (#252) --- 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 = "*" }