Skip to content

Commit

Permalink
refactor(util.executable): log output, cleanup unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Sep 23, 2018
1 parent c53e469 commit e178127
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Util/Executable.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

use Ahc\Cli\Helper\Shell;
use Ahc\Cli\IO\Interactor;
use Symfony\Component\Process\ExecutableFinder;
use Symfony\Component\Process\Process;

abstract class Executable
{
Expand Down Expand Up @@ -95,8 +93,8 @@ protected function runCommand($command)

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

(new Path)->writeFile($this->logFile, $proc->getErrorOutput(), \FILE_APPEND);

$data = $proc->getOutput() . \PHP_EOL . $proc->getErrorOutput();
(new Path)->writeFile($this->logFile, $data, \FILE_APPEND);
$this->isSuccessful = 0 === $proc->getExitCode();

return $proc->getOutput();
Expand Down

0 comments on commit e178127

Please sign in to comment.