Skip to content

Commit

Permalink
Update ChangeWorkingDirectoryListener.php
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter committed May 28, 2022
1 parent b423247 commit 3d039a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Listener/ChangeWorkingDirectoryListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class ChangeWorkingDirectoryListener implements EventListenerInterface
public function __invoke(ChangeWorkingDirectoryEvent $changeWorkingDirectoryEvent): void
{
$input = $changeWorkingDirectoryEvent->getInput();
$output = $changeWorkingDirectoryEvent->getOutput();
$symfonyStyle = $changeWorkingDirectoryEvent->getOutput();

/** @var string $currentWorkingDirectory */
$currentWorkingDirectory = $input->getOption('current-working-directory');
Expand All @@ -28,7 +28,7 @@ public function __invoke(ChangeWorkingDirectoryEvent $changeWorkingDirectoryEven

if (! $result) {
$changeWorkingDirectoryEvent->stopPropagation();
$output->error(sprintf(
$symfonyStyle->error(sprintf(
'Unable to change current working directory; %s; "%s" given.',
error_get_last()['message'] ?? 'No such file or directory',
$currentWorkingDirectory
Expand Down

0 comments on commit 3d039a1

Please sign in to comment.