You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Also, when the env file was not found, the admin credentials did not appear in the output:
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:
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Previously, the setup script only checked for
../env/magento.env.As a result, when the
magento.envfile was located in./env, the script showed the warning:Also, when the env file was not found, the admin credentials did not appear in the output:
Changes
./env/magento.envbefore checking../env/magento.env.Result