-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Environment variables ignored if the value provided in the configuration file #5960
Comments
sonnykt
added a commit
to sonnykt/drush
that referenced
this issue
Apr 19, 2024
…ided in the user configuration file.
sonnykt
added a commit
to sonnykt/drush
that referenced
this issue
Apr 19, 2024
…ided in the user configuration file. On-behalf-of: @salsadigitalauorg <sonny.kieu@salsa.digital>
sonnykt
added a commit
to sonnykt/drush
that referenced
this issue
Apr 24, 2024
On-behalf-of: @salsadigitalorgau <sonny.kieu@salsa.digital>
sonnykt
added a commit
to sonnykt/drush
that referenced
this issue
Apr 24, 2024
On-behalf-of: @salsadigitalauorg <sonny.kieu@salsa.digital>
weitzman
added a commit
that referenced
this issue
Apr 29, 2024
…he user configuration file. (#5961) * Issue #5960: Environment variables ignored if the value provided in the user configuration file. On-behalf-of: @salsadigitalauorg <sonny.kieu@salsa.digital> * Issue #5960: Updated unit test. On-behalf-of: @salsadigitalauorg <sonny.kieu@salsa.digital> --------- Co-authored-by: Moshe Weitzman <weitzman@tejasa.com>
Fixed in #5961 |
This will be available in Drush 13. Not backported to Drush 12. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Given
$HOME/.drush/drush.yml
file with the following content:When I call
Then I see the output
Expected behavior
Then I see the output
Workaround
Is there another way to do the desired action?
System Configuration
Additional information
The issue lies in Drush
ConfigLocator
. The constructor adds the user context after env context.consolidation/log
'sConfigOverlay::findContext()
looks up the contexts in reversed order hence theoptions.uri
defined in/home/.drush/drush.yml
(user context) supersedes theDRUSH_OPTIONS_URI
var (env context).In
ConfigLocator::__contruct()
If I move
USER_CONTEXT
aboveENV_CONTEXT
theDRUSH_OPTIONS_URI
will take precedence as expected.The text was updated successfully, but these errors were encountered: