From d00a5223d3ec24f0d482792d565c8ef232d4f61e Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Mon, 30 Jun 2025 19:45:26 +0800 Subject: [PATCH] Add exception for checking patch file exist --- src/SPC/store/SourcePatcher.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SPC/store/SourcePatcher.php b/src/SPC/store/SourcePatcher.php index 92af572c..1e8be792 100644 --- a/src/SPC/store/SourcePatcher.php +++ b/src/SPC/store/SourcePatcher.php @@ -177,6 +177,9 @@ class SourcePatcher } $patch_str = FileSystem::convertPath($patch_file); + if (!file_exists($patch_str)) { + throw new RuntimeException("Patch file [{$patch_str}] does not exist"); + } // Copy patch from phar if (str_starts_with($patch_str, 'phar://')) {