Skip to content

Commit d5eb087

Browse files
authored
Merge pull request #1976 from CachetHQ/cli
Don't use settings caching in cli
2 parents 5879a2c + fd25edb commit d5eb087

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/Foundation/Providers/ConfigServiceProvider.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ class ConfigServiceProvider extends ServiceProvider
3535
public function boot()
3636
{
3737
$env = $this->app->environment();
38+
$cli = $this->app->runningInConsole();
3839
$repo = $this->app->make(Repository::class);
3940
$cache = $this->app->make(Cache::class);
40-
$loaded = $cache->load($env);
41+
$loaded = $cli ? false : $cache->load($env);
4142

4243
$this->app->terminating(function () use ($repo, $cache) {
4344
if ($repo->stale()) {
@@ -46,7 +47,7 @@ public function boot()
4647
});
4748

4849
try {
49-
if ($loaded === false) {
50+
if ($cli === false && $loaded === false) {
5051
$loaded = $repo->all();
5152
$cache->store($env, $loaded);
5253
}

0 commit comments

Comments
 (0)