@@ -525,8 +525,9 @@ public function magentoCLI($command, $timeout = null, $arguments = null)
525
525
{
526
526
$ magentoBinary = realpath (MAGENTO_BP . DIRECTORY_SEPARATOR . 'bin ' . DIRECTORY_SEPARATOR . 'magento ' );
527
527
$ valid = $ this ->validateCommand ($ magentoBinary , $ command );
528
- // execute from shell when running tests from web root.
529
- if ($ valid ) {
528
+ // execute from shell when running tests from web root -- excluding cron
529
+ //TODO: investigate why cron:run hangs with shell execution on pipeline
530
+ if ($ valid && ($ command !== self ::COMMAND_CRON_RUN )) {
530
531
return $ this ->shellExecMagentoCLI ($ magentoBinary , $ command , $ timeout , $ arguments );
531
532
} else {
532
533
return $ this ->curlExecMagentoCLI ($ command , $ timeout , $ arguments );
@@ -859,13 +860,11 @@ private function shellExecMagentoCLI($magentoBinary, $command, $timeout, $argume
859
860
$ process ->setTimeout (0 );
860
861
try {
861
862
$ process ->run ();
862
- if (strpos ($ command , self ::COMMAND_CRON_RUN ) === false ) {
863
- $ output = $ process ->getOutput ();
864
- if (!$ process ->isSuccessful ()) {
865
- $ failureOutput = $ process ->getErrorOutput ();
866
- if (!empty ($ failureOutput )) {
867
- $ output = $ failureOutput ;
868
- }
863
+ $ output = $ process ->getOutput ();
864
+ if (!$ process ->isSuccessful ()) {
865
+ $ failureOutput = $ process ->getErrorOutput ();
866
+ if (!empty ($ failureOutput )) {
867
+ $ output = $ failureOutput ;
869
868
}
870
869
}
871
870
if (empty ($ output )) {
0 commit comments