From dc20222b31477486f69c53216b0ed5652aafad1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Go=CC=88kc=CC=A7e=20Go=CC=88k=20Klingel?= Date: Wed, 22 May 2024 11:09:17 +0200 Subject: [PATCH 1/2] Fix file path for the encoded text file --- internal/pkg/auth/storage.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/pkg/auth/storage.go b/internal/pkg/auth/storage.go index 87ecd9747..73bef1189 100644 --- a/internal/pkg/auth/storage.go +++ b/internal/pkg/auth/storage.go @@ -96,7 +96,7 @@ func setAuthFieldInEncodedTextFile(activeProfile string, key authFieldKey, value profileTextFileFolderName := textFileFolderName if activeProfile != "" { - profileTextFileFolderName = filepath.Join(activeProfile, textFileFolderName) + profileTextFileFolderName = filepath.Join(textFileFolderName, activeProfile) } textFileDir := filepath.Join(configDir, profileTextFileFolderName) @@ -185,7 +185,7 @@ func getAuthFieldFromEncodedTextFile(activeProfile string, key authFieldKey) (st profileTextFileFolderName := textFileFolderName if activeProfile != "" { - profileTextFileFolderName = filepath.Join(activeProfile, textFileFolderName) + profileTextFileFolderName = filepath.Join(textFileFolderName, activeProfile) } textFileDir := filepath.Join(configDir, profileTextFileFolderName) @@ -222,7 +222,7 @@ func createEncodedTextFile(activeProfile string) error { profileTextFileFolderName := textFileFolderName if activeProfile != "" { - profileTextFileFolderName = filepath.Join(activeProfile, textFileFolderName) + profileTextFileFolderName = filepath.Join(textFileFolderName, activeProfile) } textFileDir := filepath.Join(configDir, profileTextFileFolderName) From 7c7e3360f43533a5fa25a6edcdbcc0979dbd51c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Go=CC=88kc=CC=A7e=20Go=CC=88k=20Klingel?= Date: Wed, 22 May 2024 11:19:01 +0200 Subject: [PATCH 2/2] fix unit test --- internal/pkg/auth/storage_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/auth/storage_test.go b/internal/pkg/auth/storage_test.go index 5733ab69a..4d1593020 100644 --- a/internal/pkg/auth/storage_test.go +++ b/internal/pkg/auth/storage_test.go @@ -450,7 +450,7 @@ func deleteAuthFieldInEncodedTextFile(activeProfile string, key authFieldKey) er profileTextFileFolderName := textFileFolderName if activeProfile != "" { - profileTextFileFolderName = filepath.Join(activeProfile, textFileFolderName) + profileTextFileFolderName = filepath.Join(textFileFolderName, activeProfile) } textFileDir := filepath.Join(configDir, profileTextFileFolderName)