From 36b8bcf663dce72d51703bdbf8c3e4bfc3ffe096 Mon Sep 17 00:00:00 2001 From: Tareque Md Hanif Date: Wed, 13 Apr 2022 16:34:30 +0600 Subject: [PATCH] Fix Artisan history file for Windows (#35) --- src/main/tinker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/tinker.php b/src/main/tinker.php index 819cde1..a6ccafd 100644 --- a/src/main/tinker.php +++ b/src/main/tinker.php @@ -163,7 +163,7 @@ protected function createShell(BufferedOutput $output): Shell 'rawOutput' => true, ]); - $config->setHistoryFile(defined('PHP_WINDOWS_VERSION_BUILD') ? 'null' : '/dev/null'); + $config->setHistoryFile(defined('PHP_WINDOWS_VERSION_BUILD') ? $_SERVER['TEMP'] . '\\.lk_artisan_temp' : '/dev/null'); $config->getPresenter()->addCasters([ Collection::class => 'Laravel\Tinker\TinkerCaster::castCollection',