Closed (fixed)
Project:
Hosting
Version:
7.x-3.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Reporter:
Created:
28 Sep 2017 at 16:29 UTC
Updated:
20 Feb 2018 at 15:09 UTC
Jump to comment: Most recent
In trying to prepare for running different drush's depending on what site we are on, I thought the time has come to fix the hard coded "provision-$TYPE" drush command.
For those that don't know, when you implement hook_hosting_tasks(), your task type's name must match a drush command "provision-$TYPE". It's automatic. No way to override it.
What I would like to do is allow hook_hosting_tasks() to define the "command" it should run, making simpler tasks possible.
For instance:
function hook_hosting_tasks() {
$tasks['site']['sanitize'] = array(
'title' => t('Sanitize Database'),
'description' => t('Clean out your sites database by running drush sql-sanitize'),
'dialog' => TRUE,
'command' => 'sql-sanitize',
);
return $options;
}
Comments
Comment #2
jon pughComment #3
jon pugh---
Comment #4
jon pughComment #6
colanMaybe we can get the sanitizing done in #2888523: Add "Sanitize database" site task.
Comment #8
helmo commentedThis is a good preparation for provision 4.x .... And as it can be used today for e.g. #2888523: Add "Sanitize database" site task I suggest we merge it into 3.14.
Comment #10
helmo commentedMerged
Comment #11
helmo commentedThis seems to have caused a regression: #2942500: Upgrade to 3.14.0 issue on a missing task_command property