Skip to content

Commit

Permalink
fix: fix regression not calling reset after copy-from
Browse files Browse the repository at this point in the history
  • Loading branch information
stmh committed Jul 15, 2022
1 parent d42ae8d commit bdfe66d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Method/MethodFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,17 @@ public function getMethod(string $name): MethodInterface
* @param TaskContextInterface|NULL $context
* @param array $nextTasks
*
* @return TaskContext|TaskContextInterface
* @return TaskContextInterface
* @throws MethodNotFoundException
* @throws TaskNotFoundInMethodException
*/
public function runTask(
string $task_name,
HostConfig $configuration,
TaskContextInterface $context = null,
$nextTasks = []
array $nextTasks = []
) {
$saved_next_tasks = $context->getResult('runNextTasks', []);
$context->setResult('runNextTasks', $nextTasks);
$this->preflight('preflight', $task_name, $configuration, $context);
$this->runTaskImpl($task_name . 'Prepare', $configuration, $context, false);
Expand All @@ -115,6 +116,7 @@ public function runTask(
$this->runTaskImpl($task_name . 'Finished', $configuration, $context, false);
$this->preflight('postflight', $task_name, $configuration, $context);

$context->setResult('runNextTasks', $saved_next_tasks);
return $context;
}

Expand Down

0 comments on commit bdfe66d

Please sign in to comment.