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

Get the environment from config.yml if available #215

Merged
merged 1 commit into from
Oct 28, 2017

Conversation

marcelovani
Copy link
Member

I am having a little problem when running commands on a dev environment.
I followed the instruction in https://hechoendrupal.gitbooks.io/drupal-console/content/en/commands/settings-set.html and run
drupal settings:set environment dev

When I view the contents of ~/.console/config.yml I see:

    environment: dev

When I run drupal settings:debug
I get

 Config file : /Users/marcelovani/.console/config.yml

 Config key                                          Config value
 language                                            en
 environment                                         dev

So far, so good, but when I am on a dev environment, I would like all the commands to assume the --env option as dev, as per config. Likewise, if I am on stage, the default option should be that.

I have made a little change, to pull the settings from from config.
That should change the default option to whatever environment we are.
We still can override the environment by passing the --env option.
If there is no config, it will assume prod as it was before this PR.

I hope what I am suggesting makes sense.

@jmolivas
Copy link
Member

@marcelovani Thanks for your contribution, your PR was merged. This will be included in the next release.

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 this pull request may close these issues.

2 participants