From cf6ca02886423101b8ca4b3cd7a4637f5a553ea6 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Sun, 13 Aug 2017 15:53:19 -0600 Subject: [PATCH] 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. --- modules/system/console/OctoberUtil.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/system/console/OctoberUtil.php b/modules/system/console/OctoberUtil.php index 8d99b4b50..08c9ebd41 100644 --- a/modules/system/console/OctoberUtil.php +++ b/modules/system/console/OctoberUtil.php @@ -1,5 +1,6 @@ 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);