From 840555df42e1aebe1fa01779971225fc978dcfe9 Mon Sep 17 00:00:00 2001 From: Steven Qiu Date: Mon, 9 Mar 2026 23:13:47 +0800 Subject: [PATCH] make tests happy --- app/Services/Option.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Services/Option.php b/app/Services/Option.php index 87e11edc..8757d351 100644 --- a/app/Services/Option.php +++ b/app/Services/Option.php @@ -20,6 +20,11 @@ class Option return; } + if (!file_exists(storage_path('install.lock')) || app()->runningUnitTests()) { + $this->items = collect(); + return; + } + $this->items = DB::table('options') ->get() ->mapWithKeys(fn ($item) => [$item->option_name => $item->option_value]);