Skip to content

feat(env-bridge): support PROJECT_ROOT env var for project directory#917

Merged
Soner (shyim) merged 1 commit intomainfrom
feat/env-bridge-project-root-env
Mar 18, 2026
Merged

feat(env-bridge): support PROJECT_ROOT env var for project directory#917
Soner (shyim) merged 1 commit intomainfrom
feat/env-bridge-project-root-env

Conversation

@shyim
Copy link
Copy Markdown
Member

Summary

  • Allow overriding the working directory for env file loading via the PROJECT_ROOT environment variable
  • Falls back to os.Getwd() when PROJECT_ROOT is not set, preserving existing behavior

Test plan

  • Verify env-bridge loads env files from current directory when PROJECT_ROOT is unset
  • Set PROJECT_ROOT to a custom path and verify env files are loaded from that path instead

Allow overriding the working directory for env file loading via the
PROJECT_ROOT environment variable, falling back to os.Getwd() when
not set.
Copilot AI review requested due to automatic review settings March 18, 2026 07:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the env-bridge wrapper to allow selecting the project directory used for Symfony .env* file loading via the PROJECT_ROOT environment variable, while preserving the existing default behavior when it’s unset.

Changes:

  • Read PROJECT_ROOT to determine the directory used for env file loading.
  • Fall back to os.Getwd() when PROJECT_ROOT is not set.
  • Pass the resolved directory into envfile.LoadSymfonyEnvFile(...).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread env-bridge/main.go
Comment thread env-bridge/main.go
@shyim Soner (shyim) merged commit 378a63a into main Mar 18, 2026
8 checks passed
@shyim Soner (shyim) deleted the feat/env-bridge-project-root-env branch March 18, 2026 07:34
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