Skip to content

Commit 646ce53

Browse files
committed
fix(cli): use StringInput() 😅
1 parent 891d959 commit 646ce53

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Roots/Acorn/Bootstrap/RegisterConsole.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use WP_CLI;
66
use Illuminate\Contracts\Foundation\Application;
77
use Roots\Acorn\Console\Kernel;
8-
use Symfony\Component\Console\Input\ArrayInput;
8+
use Symfony\Component\Console\Input\StringInput;
99
use Symfony\Component\Console\Output\ConsoleOutput;
1010

1111
class RegisterConsole
@@ -37,13 +37,13 @@ public function bootstrap(Application $app)
3737

3838
$kernel->commands();
3939

40-
$input = $args;
40+
$command = implode(' ', $args);
4141

4242
foreach ($assoc_args as $key => $value) {
43-
$input["--{$key}"] = $value;
43+
$command .= "--{$key}='{$value}'";
4444
}
4545

46-
$status = $kernel->handle($input = new ArrayInput($input), new ConsoleOutput());
46+
$status = $kernel->handle($input = new StringInput($command), new ConsoleOutput());
4747

4848
$kernel->terminate($input, $status);
4949

0 commit comments

Comments
 (0)