From 59078e791f7ec265878584c39bcda60cb636471e Mon Sep 17 00:00:00 2001 From: denisdulici Date: Wed, 5 Feb 2020 17:19:52 +0300 Subject: [PATCH] set default version --- app/Console/Commands/Update.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/Update.php b/app/Console/Commands/Update.php index 120c32810..fd1086495 100644 --- a/app/Console/Commands/Update.php +++ b/app/Console/Commands/Update.php @@ -92,9 +92,15 @@ class Update extends Command public function getOldVersion() { - return ($this->alias == 'core') - ? version('short') - : module($this->alias)->get('version'); + if ($this->alias == 'core') { + return version('short'); + } + + if ($module = module($this->alias)) { + return $module->get('version'); + } + + return '1.0.0'; } public function download()