Closed (fixed)
Project:
Drush
Version:
7.x-5.x-dev
Component:
Base system (internal API)
Priority:
Normal
Category:
Feature request
Assigned:
Issue tags:
Reporter:
Created:
7 Jan 2013 at 19:24 UTC
Updated:
4 Jan 2014 at 02:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
greg.1.anderson commentedIn the past, we held off on such additions because there were already a couple of ways to set php options (php.ini or drush.ini in a location Drush searched for); however, I think that the ideal mechanism for setting php options is dependent on what you are trying to accomplish, and it is therefore valuable to be flexible in this area.
Therefore, for consideration, the attached patch allows the user to specify PHP_INI, DRUSH_INI or PHP_OPTIONS in environment variables, as desired.
Comment #2
greg.1.anderson commentedSame patch, but with my debug 'echo' removed. :p
Comment #3
moshe weitzman commentedChanges look good. I'd like a comment like
# Use the DRUSH_PHP environment variable if it is available.in every place where we now honor env variables.Comment #4
greg.1.anderson commentedCommitted #2, then added some documentation in 6b46616.
No tests yet.
Comment #5
greg.1.anderson commentedHere is the beginning of some work to better manage environment variables in Drush tests and in backend invoke. This will allow us to test the Drush script, and to specify environment values to use with a site in its site alias.
Comment #6
greg.1.anderson commented#5 is finished enough for one test to work, so could be reviewed and committed if desired.
Comment #7
greg.1.anderson commentedPay no attention to that out-of-place $expected in the functional test.
Comment #8
greg.1.anderson commentedThere are failures in #5, such as:
Looks like I dropped a var; will look at it later.
Comment #9
greg.1.anderson commentedAny objection to back-porting #2 + #4 to 7.x-5.x dev? Still working on tests, but Jonhattan wants to role a 5.9 release. Remove 'Release blocker' tag if you don't want it to go in.
Comment #10
greg.1.anderson commentedCommitted 5ae596c, which allows tests to specify environment variables, and adds a test of the drush script using the PHP_OPTIONS environment variable. Environment variable handling in backend invoke and aliases can be done in a separate issue, as needed.
Is this (#2, #4, #10) desired for 7.x-5.x?
Comment #11
moshe weitzman commentedIn that commit, we construct a variable $expected in the test but never use it. Not a big deal and can be backported with this blemish if needed.
Comment #12
greg.1.anderson commentedI noted that mistake in #7, but forgot to fix it. I'll remove the unused line and backport.
Comment #13
greg.1.anderson commentedBackported to 7.x-5.x.