Open
Description
Description
The current bin/setup
script is not aware of where the script was triggered:
if [ -f "../env/magento.env" ]; then
source "../env/magento.env"
else
echo "Warning: magento.env file not found."
fi
It assumes the setup script is triggered inside the bin folder, which is incorrect. With the following modification, the issue can be solved.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ -f "$SCRIPT_DIR/../env/magento.env" ]; then
source "$SCRIPT_DIR/../env/magento.env"
else
echo "Warning: magento.env file not found."
fi
Steps To Reproduce
- Run ./bin/setup "magento.test"
Expected Result
.env to be found in root/env/magento.env
Actual Result
- Run ./bin/setup "magento.test"
Warning: magento.env file not found.