@@ -37,7 +37,7 @@ public function apply(string $patch)
37
37
{
38
38
try {
39
39
$ this ->applyCheck ($ patch );
40
- $ this ->processFactory ->create (['patch ' , '--silent ' , '-f ' , '-p1 ' ], $ patch )
40
+ $ this ->processFactory ->create (['patch ' , '--silent ' , '-p1 ' , '--no-backup-if-mismatch ' ], $ patch )
41
41
->mustRun ();
42
42
} catch (ProcessFailedException $ exception ) {
43
43
throw new PatchCommandException ('Failed to apply patch ' , $ exception ->getCode (), $ exception );
@@ -51,7 +51,7 @@ public function revert(string $patch)
51
51
{
52
52
try {
53
53
$ this ->revertCheck ($ patch );
54
- $ this ->processFactory ->create (['patch ' , '--silent ' , '-f ' , '-p1 ' , '--reverse ' ], $ patch )
54
+ $ this ->processFactory ->create (['patch ' , '--silent ' , '-p1 ' , '--no-backup-if-mismatch ' , '--reverse ' ], $ patch )
55
55
->mustRun ();
56
56
} catch (ProcessFailedException $ exception ) {
57
57
throw new PatchCommandException ('Failed to revert patch ' , $ exception ->getCode (), $ exception );
@@ -64,7 +64,7 @@ public function revert(string $patch)
64
64
public function applyCheck (string $ patch )
65
65
{
66
66
try {
67
- $ this ->processFactory ->create (['patch ' , '--silent ' , '-f ' , ' - p1 ' , '--dry-run ' ], $ patch )
67
+ $ this ->processFactory ->create (['patch ' , '--silent ' , '-p1 ' , '--dry-run ' ], $ patch )
68
68
->mustRun ();
69
69
} catch (ProcessFailedException $ exception ) {
70
70
throw new PatchCommandException ('Patch cannot be applied ' , $ exception ->getCode (), $ exception );
@@ -77,7 +77,7 @@ public function applyCheck(string $patch)
77
77
public function revertCheck (string $ patch )
78
78
{
79
79
try {
80
- $ this ->processFactory ->create (['patch ' , '--silent ' , '-f ' , ' - p1 ' , '--reverse ' , '--dry-run ' ], $ patch )
80
+ $ this ->processFactory ->create (['patch ' , '--silent ' , '-p1 ' , '--reverse ' , '--dry-run ' ], $ patch )
81
81
->mustRun ();
82
82
} catch (ProcessFailedException $ exception ) {
83
83
throw new PatchCommandException ('Patch cannot be reverted ' , $ exception ->getCode (), $ exception );
0 commit comments