mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-27 06:29:19 +08:00
Skip copying vendor if error occurred when upgrading
This commit is contained in:
parent
4bf1058c46
commit
fe721bd833
@ -177,6 +177,15 @@ class UpdateController extends Controller
|
||||
}
|
||||
$zip->close();
|
||||
|
||||
try {
|
||||
File::copyDirectory("$extract_dir/vendor", base_path('vendor'));
|
||||
} catch (\Exception $e) {
|
||||
Log::error('[Extracter] Unable to extract vendors', [$e]);
|
||||
// Skip copying vendor
|
||||
File::deleteDirectory("$extract_dir/vendor");
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
File::copyDirectory($extract_dir, base_path());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user