Throw error when compiled.php exists

This commit is contained in:
Barry vd. Heuvel
2013-05-30 21:39:12 +03:00
parent a4ab0a5969
commit 26f09bccbf
@@ -52,6 +52,9 @@ class GeneratorCommand extends Command {
*/
public function fire()
{
if (file_exists($compiled = base_path().'/bootstrap/compiled.php')){
$this->error('Error: first delete bootstrap/compiled.php (php artisan clear-compiled)');
}else{
$filename = $this->argument('filename');
if($this->option('memory')){
@@ -79,7 +82,7 @@ class GeneratorCommand extends Command {
}else{
$this->error("The helper file could not be created at $filename");
}
}
}
protected function useMemoryDriver(){