Skip to content

Commit

Permalink
Merge pull request brefphp#104 from brefphp/tinker
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli authored Mar 20, 2023
2 parents be9daa4 + bfee9dc commit 1c338e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/StorageDirectories.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static function create()
self::Path . '/bootstrap/cache',
self::Path . '/framework/cache',
self::Path . '/framework/views',
self::Path . '/psysh',
];

$directories = array_filter($directories, static fn ($directory) => ! is_dir($directory));
Expand Down
5 changes: 5 additions & 0 deletions src/bref-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@

MaintenanceMode::setUp();

// Move the location of the PsySH config cache to `/tmp` (because it is writable)
$xdgHome = StorageDirectories::Path . '/psysh';
$_SERVER['XDG_CONFIG_HOME'] = $_ENV['XDG_CONFIG_HOME'] = $xdgHome;
putenv("XDG_CONFIG_HOME=$xdgHome");

$defaultConfigCachePath = $_SERVER['LAMBDA_TASK_ROOT'] . '/bootstrap/cache/config.php';

if (file_exists($defaultConfigCachePath)) {
Expand Down

0 comments on commit 1c338e9

Please sign in to comment.