Skip to content

Commit f8ec8b4

Browse files
committed
Merge branch 'develop' into 1.0-develop
2 parents d466934 + b7a6543 commit f8ec8b4

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
}

app/Services/Helpers/AssetHashService.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Illuminate\Support\Arr;
66
use Illuminate\Filesystem\FilesystemManager;
77
use Illuminate\Contracts\Filesystem\Filesystem;
8+
use Pterodactyl\Exceptions\ManifestDoesNotExistException;
89

910
class 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
}

0 commit comments

Comments
 (0)