Skip to content

Commit 889c064

Browse files
committed
Merge branch 'develop'
* develop: Better output
2 parents 6c3888b + 3bfa8cf commit 889c064

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Ssh.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ class Ssh extends BaseTask
7676
*/
7777
protected $physicalRemoteDir = false;
7878

79+
/**
80+
* Stores ssh command output.
81+
*
82+
* @var string
83+
*/
84+
protected $output = '';
85+
7986
/**
8087
* Creates a new Ssh task.
8188
*
@@ -244,6 +251,8 @@ public function run()
244251
$this->commandCallback($command['callback']),
245252
]
246253
);
254+
$this->printTaskInfo($this->output);
255+
$this->output = '';
247256
if ($result === false || $ssh->getExitStatus() !== 0) {
248257
$errorMessage .= sprintf(
249258
'Could not execute %s on %s on port %s in folder %s with message: %s.',
@@ -283,7 +292,7 @@ protected function commandCallback($callback)
283292
{
284293
return (
285294
function ($output) use ($callback) {
286-
$this->printTaskInfo($output);
295+
$this->output .= $output;
287296
if (is_callable($callback)) {
288297
return call_user_func($callback, $output);
289298
}

0 commit comments

Comments
 (0)