Skip to content

Commit

Permalink
Added exception error when bootstrap/cache directory is not writable
Browse files Browse the repository at this point in the history
  • Loading branch information
macdabby committed Mar 1, 2017
1 parent 2d5514c commit 128ab51
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Illuminate/Foundation/ProviderRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Illuminate\Foundation;

use Illuminate\Filesystem\Filesystem;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Contracts\Foundation\Application as ApplicationContract;

class ProviderRepository
Expand Down Expand Up @@ -180,9 +181,14 @@ protected function freshManifest(array $providers)
*
* @param array $manifest
* @return array
* @throws FileNotFoundException
*/
public function writeManifest($manifest)
{
if (! is_writable(dirname($this->manifestPath))) {
throw new FileNotFoundException('The bootstrap/cache directory must be present and writable.');
}

$this->files->put(
$this->manifestPath, '<?php return '.var_export($manifest, true).';'
);
Expand Down

0 comments on commit 128ab51

Please sign in to comment.