Skip to content

Commit

Permalink
Merge pull request #10 from loft-sh/fix/token-credentials
Browse files Browse the repository at this point in the history
fix: path json auth credentials before retrieving token
  • Loading branch information
pascalbreuninger authored Dec 14, 2023
2 parents 0c567b5 + 21eb63e commit 4c69b84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/gcloud/gcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4c69b84

Please sign in to comment.