Skip to content

Commit e178127

Browse files
committed
refactor(util.executable): log output, cleanup unused imports
1 parent c53e469 commit e178127

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Util/Executable.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
use Ahc\Cli\Helper\Shell;
1515
use Ahc\Cli\IO\Interactor;
16-
use Symfony\Component\Process\ExecutableFinder;
17-
use Symfony\Component\Process\Process;
1816

1917
abstract class Executable
2018
{
@@ -95,8 +93,8 @@ protected function runCommand($command)
9593

9694
$proc->setOptions($this->workDir)->execute();
9795

98-
(new Path)->writeFile($this->logFile, $proc->getErrorOutput(), \FILE_APPEND);
99-
96+
$data = $proc->getOutput() . \PHP_EOL . $proc->getErrorOutput();
97+
(new Path)->writeFile($this->logFile, $data, \FILE_APPEND);
10098
$this->isSuccessful = 0 === $proc->getExitCode();
10199

102100
return $proc->getOutput();

0 commit comments

Comments
 (0)