Skip to content

Commit fa9d917

Browse files
committed
Use '--batch' switch for patch so it fails if target file doesn't exist instead of waiting for input
1 parent 35eb384 commit fa9d917

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PatchApplicator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private function executePatchCommand($method, $targetDirectory, $patchFile, $str
112112
$cwd = null;
113113

114114
if ($method === self::METHOD_PATCH && $this->hasPatchCommand()) {
115-
$cmd = ['patch', '--posix', '--strip=' . $stripPathComponents, '--input='.$patchFile, '--directory='.$targetDirectory];
115+
$cmd = ['patch', '--posix', '--batch', '--strip=' . $stripPathComponents, '--input='.$patchFile, '--directory='.$targetDirectory];
116116
} else {
117117
$cmd = ['git', 'apply', '-v', '-p' . $stripPathComponents, $patchFile];
118118

0 commit comments

Comments
 (0)