From 0dddcfca36d1b60dda2541b7267c126802e3835e Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 Feb 2022 11:54:12 -0500 Subject: [PATCH] Continue to throw exceptions when file is not found --- app/Services/Helpers/AssetHashService.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Services/Helpers/AssetHashService.php b/app/Services/Helpers/AssetHashService.php index ac77aec4f..ba98cd3aa 100644 --- a/app/Services/Helpers/AssetHashService.php +++ b/app/Services/Helpers/AssetHashService.php @@ -4,6 +4,7 @@ namespace Pterodactyl\Services\Helpers; use Illuminate\Support\Arr; use Illuminate\Filesystem\FilesystemManager; +use Illuminate\Contracts\Filesystem\FileNotFoundException; class AssetHashService { @@ -114,6 +115,10 @@ class AssetHashService */ protected function manifest(): array { + if (!$this->filesystem->exists(self::MANIFEST_PATH)) { + throw new FileNotFoundException('No manifest file was found: ' . self::MANIFEST_PATH); + } + return self::$manifest ?: self::$manifest = json_decode( $this->filesystem->get(self::MANIFEST_PATH), true