protected function askBeforeExecutingTask($question, \Closure $task)
{
$response = null;
while (!in_array($response, array('y', 'n'))) {
$response = strtolower($this->output->ask('<comment>' . $question . ' (y/n)</comment>'));
}
$this->output->outputLine();
switch ($response) {
case 'y':
$task();
break;
case 'n':
$this->output->outputLine('Skipping.');
break;
}
}