From 21eb63eba549735dafb9f1aa728f9effdf368767 Mon Sep 17 00:00:00 2001 From: Pascal Breuninger Date: Thu, 14 Dec 2023 08:55:31 +0100 Subject: [PATCH] fix: path json auth credentials before retrieving token --- pkg/gcloud/gcloud.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/gcloud/gcloud.go b/pkg/gcloud/gcloud.go index 8622347..4b3560e 100644 --- a/pkg/gcloud/gcloud.go +++ b/pkg/gcloud/gcloud.go @@ -74,6 +74,11 @@ func ParseToken(tok string) (*oauth2.Token, error) { } func GetToken(ctx context.Context) ([]byte, error) { + err := SetupEnvJson(ctx) + if err != nil { + return nil, err + } + tokSource, err := DefaultTokenSource(ctx) if err != nil { return nil, err