Skip to content

Commit 68a4f8c

Browse files
committed
MC-37324: Add fallback to 'patch' command when 'git' command is not available
1 parent e4a801d commit 68a4f8c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/Patch/PatchCommand.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,25 @@
77

88
namespace Magento\CloudPatches\Patch;
99

10+
use Magento\CloudPatches\Shell\Command\DriverInterface;
11+
1012
/**
1113
* Patch command selector
1214
*/
1315
class PatchCommand implements PatchCommandInterface
1416
{
1517
/**
16-
* @var PatchCommandInterface[]
18+
* @var DriverInterface[]
1719
*/
1820
private $commands;
1921

2022
/**
21-
* @var PatchCommandInterface
23+
* @var DriverInterface
2224
*/
2325
private $command;
2426

2527
/**
26-
* @param PatchCommandInterface[] $commands
28+
* @param DriverInterface[] $commands
2729
*/
2830
public function __construct(
2931
array $commands
@@ -66,10 +68,10 @@ public function revertCheck(string $patch)
6668
/**
6769
* Return first available command
6870
*
69-
* @return PatchCommandInterface
71+
* @return DriverInterface
7072
* @throws PatchCommandNotFound
7173
*/
72-
private function getCommand(): PatchCommandInterface
74+
private function getCommand(): DriverInterface
7375
{
7476
if ($this->command === null) {
7577
foreach ($this->commands as $command) {

0 commit comments

Comments
 (0)