Support no database existing when october:util set build is run
This fixes an issue when composer automatically calls the `php artisan october:util set build` command after installing dependencies but before a database has been initialized for October.
This commit is contained in:
parent
7c3d4705fc
commit
cf6ca02886
|
|
@ -1,5 +1,6 @@
|
|||
<?php namespace System\Console;
|
||||
|
||||
use App;
|
||||
use Lang;
|
||||
use File;
|
||||
use Config;
|
||||
|
|
@ -25,6 +26,7 @@ use Exception;
|
|||
* - compile less: Compile registered LESS files only.
|
||||
* - compile scss: Compile registered SCSS files only.
|
||||
* - compile lang: Compile registered Language files only.
|
||||
* - set build: Pull the latest stable build number from the update gateway and set it as the current build number.
|
||||
*
|
||||
* @package october\system
|
||||
* @author Alexey Bobkov, Samuel Georges
|
||||
|
|
@ -115,6 +117,14 @@ class OctoberUtil extends Command
|
|||
{
|
||||
$this->comment('-');
|
||||
|
||||
/*
|
||||
* Skip setting the build number if no database is detected to set it within
|
||||
*/
|
||||
if (!App::hasDatabase()) {
|
||||
$this->comment('No database detected - skipping setting the build number.');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$build = UpdateManager::instance()->setBuildNumberManually();
|
||||
$this->comment('*** October sets build: '.$build);
|
||||
|
|
|
|||
Loading…
Reference in New Issue