From b4e23ce79f805da6211acb98d174fb79b4e31bc8 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Fri, 3 May 2019 08:32:09 +0800 Subject: [PATCH] Add message for 4.1.0 update script --- database/update_scripts/update-4.0.4-to-4.1.0.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/database/update_scripts/update-4.0.4-to-4.1.0.php b/database/update_scripts/update-4.0.4-to-4.1.0.php index f82f2dae..44ed3ca9 100644 --- a/database/update_scripts/update-4.0.4-to-4.1.0.php +++ b/database/update_scripts/update-4.0.4-to-4.1.0.php @@ -6,6 +6,17 @@ use Artisan; $artisan->resolveCommands([\Laravel\Passport\Console\KeysCommand::class]); }); +$tips = []; + Artisan::call('jwt:secret', ['--no-interaction' => true]); Artisan::call('migrate', ['--force' => true]); -Artisan::call('passport:keys', ['--no-interaction' => true]); +try { + Artisan::call('passport:keys', ['--no-interaction' => true]); +} catch (\Exception $e) { + $tips[] = nl2br(implode("\n", [ + '您需要打开终端或 PowerShell 来执行这条命令:php artisan passport:keys', + 'You need to open terminal or PowerShell and execute: php artisan passport:keys' + ])); +} + +return $tips;