Skip to content

Source environment relatively from script path in bin/setup#1403

Open
CasEbb wants to merge 1 commit intomarkshust:release/nextfrom
CasEbb:fix-bin-setup-env-source
Open

Source environment relatively from script path in bin/setup#1403
CasEbb wants to merge 1 commit intomarkshust:release/nextfrom
CasEbb:fix-bin-setup-env-source

Conversation

@CasEbb
Copy link
Copy Markdown
Contributor

@CasEbb CasEbb commented Jan 28, 2026

When following the installation instructions from the readme, running bin/setup yields a warning magento.env file not found. This is because the environment is sourced from ../env/magento.env, and assuming we're running the script in $PWD, it is trying to source the env from $PWD/../env/magento.env, while the file is in $PWD/env/magento.env (assuming we didn't cd into bin/).

This PR changes bin/setup to prepend the paths with the script dir so it always finds magento.env regardless of the working directory. This is also probably a more durable solution than the one proposed in #1385.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jan 28, 2026
@what-the-diff
Copy link
Copy Markdown

what-the-diff Bot commented Jan 28, 2026

PR Summary

  • Dynamic Path Update for "magento.env" File
    This update introduces a change in how we locate the "magento.env" file. Instead of using a fixed path, we have made it dynamically determined. This enhances its portability and adaptability, essentially making it easier for our system to find and use this file, regardless of where it's stored.

@dosubot dosubot Bot added the bug label Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant