Skip to content

Commit 168b046

Browse files
committed
Merge branch 'bootstrap_cache_exception' of https://github.com/macdabby/framework into macdabby-bootstrap_cache_exception
2 parents 7bb67e2 + 128ab51 commit 168b046

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Illuminate/Foundation/ProviderRepository.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Illuminate\Foundation;
44

55
use Illuminate\Filesystem\Filesystem;
6+
use Illuminate\Contracts\Filesystem\FileNotFoundException;
67
use Illuminate\Contracts\Foundation\Application as ApplicationContract;
78

89
class ProviderRepository
@@ -180,9 +181,14 @@ protected function freshManifest(array $providers)
180181
*
181182
* @param array $manifest
182183
* @return array
184+
* @throws FileNotFoundException
183185
*/
184186
public function writeManifest($manifest)
185187
{
188+
if (! is_writable(dirname($this->manifestPath))) {
189+
throw new FileNotFoundException('The bootstrap/cache directory must be present and writable.');
190+
}
191+
186192
$this->files->put(
187193
$this->manifestPath, '<?php return '.var_export($manifest, true).';'
188194
);

0 commit comments

Comments
 (0)