From 5aee7ad1f12dde0e8c77ee7ade3afbb362a16875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20S=C3=BC=C3=9F?= Date: Thu, 4 Jan 2024 14:16:09 +0100 Subject: [PATCH] fix: set name of correct context when creating (#298) --- pkg/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 0b408ad2..2b484792 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -168,7 +168,7 @@ func Set(path string, value string) error { func CreateContext(name string) error { viper.Set(CURRENT_CONTEXT, name) - viper.Set("contexts.default.name", name) + viper.Set(fmt.Sprintf("contexts.%s.name", name), name) return Write() }