Skip to content

Commit d00a522

Browse files
committed
Add exception for checking patch file exist
1 parent 3965a89 commit d00a522

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/SPC/store/SourcePatcher.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ public static function patchFile(string $patch_name, string $cwd, bool $reverse
177177
}
178178

179179
$patch_str = FileSystem::convertPath($patch_file);
180+
if (!file_exists($patch_str)) {
181+
throw new RuntimeException("Patch file [{$patch_str}] does not exist");
182+
}
180183

181184
// Copy patch from phar
182185
if (str_starts_with($patch_str, 'phar://')) {

0 commit comments

Comments
 (0)