Config::onProduction fails if using branch name "main"
Opened this issue · 3 comments
mglaman commented
The onProduction
method fails if you use a branch name of main
.
$prodBranch = $this->onDedicated() ? 'production' : 'master';
pjcdawkins commented
Fixing this properly will depend on the rollout of environment types, which is soon (https://platform.sh/blog/2021/environment-types-simpler-user-permissions/) - there would be a PLATFORM_ENVIRONMENT_TYPE=production
variable I believe.
Meanwhile, you'd have to use getenv('PLATFORM_BRANCH') === 'main'
gilzow commented
@pjcdawkins do you think we can close this one since environment types have been out for a couple of years now?
amanire commented
Just noting that this is not resolved in 2.4.1.