Skip to content

Commit fc37661

Browse files
committed
fix: trim out wp if used in a wp-cli command
1 parent b173faf commit fc37661

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Command/WpCliCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ protected function perform(InputInterface $input, OutputStyle $output)
5555
throw new InvalidArgumentException('You must specify the WP-CLI command to run when running in non-interactive mode');
5656
}
5757

58+
if ('wp ' === substr($command, 0, 3)) {
59+
$command = substr($command, 3);
60+
}
61+
5862
if (in_array($command, ['shell'])) {
5963
throw new RuntimeException(sprintf('The "wp %s" command isn\'t available remotely', $command));
6064
}

0 commit comments

Comments
 (0)