Skip to content

Commit

Permalink
Merge pull request #63 from tractorcow/fix/stream-output
Browse files Browse the repository at this point in the history
Re-enable stream logging for single-server deployments
  • Loading branch information
stecman authored Jul 28, 2020
2 parents bcd80ef + 6216711 commit 9bf1b05
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"require-dev": {
"phpunit/phpunit": "~5.0",
"mikey179/vfsStream": "~1.2",
"mikey179/vfsstream": "~1.2",
"symfony/finder": "~2.2"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Beam.php
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ protected function doExecCommand($command, $outputHandler)

if ($command['tty']) {

passthru(sprintf('%s; %s',
passthru(sprintf('%s; %s 2>&1',
"cd {$this->getLocalPath()}",
$command['command']
), $exit);
Expand Down
4 changes: 3 additions & 1 deletion src/DeploymentProvider/Rsync.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ public function up(Closure $output = null, $dryrun = false, DeploymentResult $de
/** @var DeploymentResult $mergedResult */
$mergedResult = null;
$results = [];
// silent per-server output when collating multiple streams
$silent = count($this->getTargetPaths()) > 1;
foreach ($this->getTargetPaths() as $server => $targetPath) {
$result = $this->deploy(
$this->buildCommand(
Expand All @@ -125,7 +127,7 @@ public function up(Closure $output = null, $dryrun = false, DeploymentResult $de
$dryrun
),
$output,
true // silence per-server output
$silent
);
$result->setName($server);
$results[] = $result;
Expand Down

0 comments on commit 9bf1b05

Please sign in to comment.