Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config::onProduction fails if using branch name "main" #21

Open
mglaman opened this issue Jun 17, 2021 · 4 comments · May be fixed by #22
Open

Config::onProduction fails if using branch name "main" #21

mglaman opened this issue Jun 17, 2021 · 4 comments · May be fixed by #22

Comments

@mglaman
Copy link

mglaman commented Jun 17, 2021

The onProduction method fails if you use a branch name of main.

$prodBranch = $this->onDedicated() ? 'production' : 'master';
@pjcdawkins
Copy link
Collaborator

pjcdawkins commented Jun 17, 2021

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
Copy link
Contributor

gilzow commented Sep 13, 2023

@pjcdawkins do you think we can close this one since environment types have been out for a couple of years now?

@amanire
Copy link

amanire commented May 20, 2024

Just noting that this is not resolved in 2.4.1.

@ylp-ineris
Copy link

Just noting that

  • this is not resolved in 3.0.0 :-)
  • this bug implies another real and anoying bug in platform.sh Drupal10 template
  • a 2022 PR existts and may fix the problem

There may be something to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants