File tree Expand file tree Collapse file tree 3 files changed +47
-1
lines changed
Expand file tree Collapse file tree 3 files changed +47
-1
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Pterodactyl \Exceptions ;
4+
5+ use Exception ;
6+ use Spatie \Ignition \Contracts \Solution ;
7+ use Spatie \Ignition \Contracts \ProvidesSolution ;
8+
9+ class ManifestDoesNotExistException extends Exception implements ProvidesSolution
10+ {
11+ public function getSolution (): Solution
12+ {
13+ return new Solutions \ManifestDoesNotExistSolution ();
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Pterodactyl \Exceptions \Solutions ;
4+
5+ use Spatie \Ignition \Contracts \Solution ;
6+
7+ class ManifestDoesNotExistSolution implements Solution
8+ {
9+ public function getSolutionTitle (): string
10+ {
11+ return "The manifest.json file hasn't been generated yet " ;
12+ }
13+
14+ public function getSolutionDescription (): string
15+ {
16+ return 'Run yarn run build:production to build the frontend first. ' ;
17+ }
18+
19+ public function getDocumentationLinks (): array
20+ {
21+ return [
22+ 'Docs ' => 'https://github.com/pterodactyl/panel/blob/develop/package.json ' ,
23+ ];
24+ }
25+ }
Original file line number Diff line number Diff line change 55use Illuminate \Support \Arr ;
66use Illuminate \Filesystem \FilesystemManager ;
77use Illuminate \Contracts \Filesystem \Filesystem ;
8+ use Pterodactyl \Exceptions \ManifestDoesNotExistException ;
89
910class AssetHashService
1011{
@@ -106,6 +107,11 @@ protected function manifest(): array
106107 );
107108 }
108109
109- return static ::$ manifest ;
110+ $ manifest = static ::$ manifest ;
111+ if ($ manifest === null ) {
112+ throw new ManifestDoesNotExistException ();
113+ }
114+
115+ return $ manifest ;
110116 }
111117}
You can’t perform that action at this time.
0 commit comments