Skip to content

Commit 32b3476

Browse files
committed
Updated loadAction method
1 parent c501b1d commit 32b3476

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Console.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
namespace Kiboko\Component\Runtime\Workflow;
66

7+
use Kiboko\Component\Action\Action;
78
use Kiboko\Component\Pipeline\Pipeline;
89
use Kiboko\Component\Runtime\Pipeline\Console as PipelineConsoleRuntime;
10+
use Kiboko\Component\Runtime\Action\Console as ActionConsoleRuntime;
911
use Kiboko\Component\State;
1012
use Kiboko\Contract\Pipeline\PipelineRunnerInterface;
1113
use Kiboko\Contract\Pipeline\RunnableInterface;
@@ -34,13 +36,13 @@ public function loadPipeline(string $filename): PipelineConsoleRuntime
3436
return $factory(new PipelineConsoleRuntime($this->output, $pipeline, $this->state->withPipeline(basename($filename))));
3537
}
3638

37-
public function loadAction(string $filename): PipelineConsoleRuntime
39+
public function loadAction(string $filename): ActionConsoleRuntime
3840
{
3941
$factory = require $filename;
4042

41-
$pipeline = new Pipeline($this->pipelineRunner);
43+
$action = new Action($this->pipelineRunner);
4244

43-
return $factory(new PipelineConsoleRuntime($this->output, $pipeline, $this->state->withPipeline(basename($filename))));
45+
return $factory(new ActionConsoleRuntime($this->output, $action, $this->state->withAction(basename($filename))));
4446
}
4547

4648
public function job(RunnableInterface $job): self

0 commit comments

Comments
 (0)