Skip to content

Commit

Permalink
Fix bug with box.json getting wiped if they get set to null
Browse files Browse the repository at this point in the history
  • Loading branch information
rforced committed Jul 19, 2024
1 parent 00ffc27 commit bd5f1a3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/Commands/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,15 @@ function () use ($configFile, $config) {

private function clear(): void
{
File::put($this->app->configPath('app.php'), self::$config);

File::put($this->app->basePath('box.json'), self::$box);

self::$config = null;
if (self::$config !== null) {
File::put($this->app->configPath('app.php'), self::$config);
self::$config = null;
}

self::$box = null;
if (self::$box !== null) {
File::put($this->app->basePath('box.json'), self::$box);
self::$box = null;
}
}

/**
Expand Down

0 comments on commit bd5f1a3

Please sign in to comment.