From 2c43a3f91d9b2537f5224776ec2d5b3914daf224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20Tokar=C4=8D=C3=ADk?= Date: Sat, 5 Dec 2020 01:55:42 +0100 Subject: [PATCH] Handle the case of no active profile --- tool/tsh/tsh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/tsh/tsh.go b/tool/tsh/tsh.go index 4f8c1dc9547fb..414acee902ef0 100644 --- a/tool/tsh/tsh.go +++ b/tool/tsh/tsh.go @@ -1057,7 +1057,7 @@ func onListClusters(cf *CLIConf) { utils.FatalError(err) } showActive := func(cluster services.RemoteCluster) string { - if profile.Cluster == cluster.GetName() { + if profile != nil && cluster.GetName() == profile.Cluster { return "*" } return ""