throw error message from console

This commit is contained in:
denisdulici 2019-12-12 11:10:55 +03:00
parent e1b2c74b44
commit d1246cd5b1
2 changed files with 5 additions and 3 deletions

View File

@ -16,6 +16,6 @@ class Console
return true; return true;
} }
return false; return $process->getExitCodeText();
} }
} }

View File

@ -134,8 +134,10 @@ class Updater
$command = "php artisan update:finish {$alias} {$company_id} {$new} {$old}"; $command = "php artisan update:finish {$alias} {$company_id} {$new} {$old}";
if (!Console::run($command)) { if (true !== $result = Console::run($command)) {
throw new \Exception(trans('modules.errors.finish', ['module' => $alias])); $message = !empty($result) ? $result : trans('modules.errors.finish', ['module' => $alias]);
throw new \Exception($message);
} }
} }