Commit ef16eca2 authored by drumm's avatar drumm Committed by Neil Drumm

Fetch alias options in the class that saves them.

parent 4595b415
......@@ -128,11 +128,7 @@ class provisionService_http extends provisionService {
* Write out server's drushrc alias file.
*/
function write_alias() {
$data = array();
foreach (array('web_id', 'web_host', 'web_ports', 'web_group', 'restart_cmd') as $key) {
$data[$key] = drush_get_option($key);
}
$config = new provisionConfig_drushrc_alias(drush_get_option('web_host'), $data);
$config = new provisionConfig_drushrc_alias(drush_get_option('web_host'), array('web_id', 'web_host', 'web_ports', 'web_group', 'restart_cmd'));
$config->write();
}
}
......@@ -141,8 +141,14 @@ class provisionConfig_drushrc extends provisionConfig {
class provisionConfig_drushrc_alias extends provisionConfig_drushrc {
public $template = 'provision_drushrc_alias.tpl.php';
function __construct($aliasname, $data = array()) {
function __construct($aliasname, $options = array()) {
$this->aliasname = $aliasname;
$data = array();
foreach ($options as $key) {
$data[$key] = drush_get_option($key);
}
parent::__construct($data);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment