Skip to content

Conversation

@angelvilaplana
Copy link

Summary

Previously, the setup script only checked for ../env/magento.env.
As a result, when the magento.env file was located in ./env, the script showed the warning:

image

Also, when the env file was not found, the admin credentials did not appear in the output:

image

Changes

  • Added a check for ./env/magento.env before checking ../env/magento.env.
  • This ensures the environment file is sourced correctly.

Result

  • The warning no longer appears when the file exists in the current directory.
  • The admin credentials are now displayed correctly after setup:
image

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Oct 12, 2025
@what-the-diff
Copy link

what-the-diff bot commented Oct 12, 2025

PR Summary

  • Updated magento.env File Path
    Instead of checking the parent directory first, the system will now initially look in the current directory for the magento.env file.

  • Enhanced Logic for Sourcing Environment File
    If the magento.env file exists in the current directory, the system will source it from here. If not, the system will look in the parent directory as a backup option. This provides a more flexible and adaptive way of sourcing the necessary file.

@dosubot dosubot bot added the bug label Oct 12, 2025
@markshust
Copy link
Owner

Looks like shellcheck is failing. Besides that, why would the env directory be located at src/env? This is a non-standard location.

@angelvilaplana
Copy link
Author

Hi @markshust,

Yes, you're right. The env folder is in the root directory, and the src folder is also in the root but in a different subfolder. However, even in this case, I’m still getting the same error. When I run bin/setup, it tries to execute outside the project folder, so the env file can’t be found.

Hmm, I see that the test is running ./compose/bin/setup. In my case, I run bin/setup to install the environment. It should still work anyway, since I added a condition to make sure the file ./env/magento.env exists before running the source command.

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.

2 participants