Skip to content

Access env variables while initializing ApiClient #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2025

Conversation

shaileshpadave
Copy link
Contributor

@shaileshpadave shaileshpadave commented May 18, 2025

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • WHOSUSING.md
  • Other (please describe):

NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.

Changes in this PR

Previously, calling new ApiClient() only set the useEnvVariables flag on the builder, but the environment variables were not actually applied until build() was invoked. Now, after setting the flag, we explicitly call applyEnvVariables() to ensure the environment values are set before the client is initialised.

Describe the new behavior from this PR, and why it's needed
Issue #

Alternatives considered

Describe alternative implementation you have considered

@shaileshpadave shaileshpadave force-pushed the fixEnvVarIssue branch 2 times, most recently from ce27828 to a8ef938 Compare May 20, 2025 10:36
@shaileshpadave shaileshpadave changed the title Trimmed env variables Access env variables while initializing ApiClient May 20, 2025
@shaileshpadave shaileshpadave merged commit 12f06de into main May 20, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants