File tree 4 files changed +20
-2
lines changed
4 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ public function __construct(?DrushConfig $config = NULL) {
26
26
}
27
27
$ this ->set ('drush.bin ' , $ config ->get ("runtime.drush-script " ));
28
28
$ this ->setDefault ('drush.alias ' , "self " );
29
+ $ this ->setDefault ('drush.uri ' , $ config ->get ('options.uri ' ));
29
30
$ this ->combine ($ config ->export ());
30
31
}
31
32
}
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ public function switchSiteContext(string $site_name): void {
113
113
*/
114
114
protected function initializeConfig (string $ site_name = "" ): void {
115
115
$ config = new DefaultDrushConfig ($ this ->getConfig ());
116
- $ configInitializer = new ConfigInitializer ($ config, $ this -> input () );
116
+ $ configInitializer = new ConfigInitializer ($ config );
117
117
if ($ site_name ) {
118
118
$ configInitializer ->setSite ($ site_name );
119
119
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace Acquia \Drupal \RecommendedSettings \Robo \Config ;
4
4
5
+ use Acquia \Drupal \RecommendedSettings \Config \ConfigInitializer ;
6
+ use Acquia \Drupal \RecommendedSettings \Config \DefaultDrushConfig ;
5
7
use Drush \Config \ConfigAwareTrait as DrushConfigAwareTrait ;
8
+ use Drush \Config \DrushConfig ;
6
9
7
10
/**
8
11
* Adds custom methods to DrushConfigAwareTrait.
9
12
*/
10
13
trait ConfigAwareTrait {
11
14
12
- use DrushConfigAwareTrait;
15
+ use DrushConfigAwareTrait {
16
+ DrushConfigAwareTrait::getConfig as parentDrushGetConfig;
17
+ }
18
+
19
+ /**
20
+ * {@inheritdoc}
21
+ */
22
+ public function getConfig (): DrushConfig {
23
+ if (!$ this ->config instanceof DefaultDrushConfig) {
24
+ $ this ->config = new DefaultDrushConfig ($ this ->parentDrushGetConfig ());
25
+ }
26
+ return $ this ->config ;
27
+ }
13
28
14
29
/**
15
30
* {@inheritdoc}
Original file line number Diff line number Diff line change 2
2
3
3
namespace Acquia \Drupal \RecommendedSettings \Robo \Tasks ;
4
4
5
+ use Acquia \Drupal \RecommendedSettings \Robo \Config \ConfigAwareTrait ;
5
6
use Robo \Common \CommandArguments ;
6
7
use Robo \Exception \TaskException ;
7
8
use Robo \Task \CommandStack ;
22
23
*/
23
24
class DrushTask extends CommandStack {
24
25
26
+ use ConfigAwareTrait;
25
27
use CommandArguments {
26
28
option as traitOption;
27
29
}
You can’t perform that action at this time.
0 commit comments