File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments