Skip to content

Commit

Permalink
fix box.json getting emptied on Ctrl-C (#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
rforced authored Dec 2, 2024
1 parent f1d8104 commit 9e2c9d4
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 @@ -208,13 +208,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 9e2c9d4

Please sign in to comment.