Skip to content

Commit

Permalink
Modify get secrets logic
Browse files Browse the repository at this point in the history
  • Loading branch information
maidul98 committed Jan 13, 2023
1 parent 1ac94ee commit 35466a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cli/packages/util/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,9 @@ func GetAllEnvironmentVariables(envName string) ([]models.SingleEnvironmentVaria
secrets, err := GetPlainTextSecretsViaJTW(loggedInUserDetails.UserCredentials.JTWToken, loggedInUserDetails.UserCredentials.PrivateKey, workspaceFile.WorkspaceId, envName)
return secrets, err

} else if infisicalToken != "" {
} else {
log.Debug("Trying to fetch secrets using service token")
return GetPlainTextSecretsViaServiceToken(infisicalToken)
} else {
return nil, fmt.Errorf("unable to fetch secrets because we could not find a service token or a logged in user")
}
}

Expand Down

0 comments on commit 35466a7

Please sign in to comment.