Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Nov 30, 2024
1 parent 88b778a commit aa78608
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Foundation/Console/Concerns/CopyTestbenchFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,17 @@ protected function copyTestbenchDotEnvFile(
$testbenchEnvFilename = $this->testbenchEnvironmentFile();

$configurationFile = LazyCollection::make(static function () use ($testbenchEnvFilename) {
$defaultTestbenchEnvFilename = '.env';

yield $testbenchEnvFilename;
yield "{$testbenchEnvFilename}.example";
yield "{$testbenchEnvFilename}.dist";
})->map(static fn ($file) => join_paths($workingPath, $file))

yield $defaultTestbenchEnvFilename;
yield "{$defaultTestbenchEnvFilename}.example";
yield "{$defaultTestbenchEnvFilename}.dist";
})->unique()
->map(static fn ($file) => join_paths($workingPath, $file))
->filter(static fn ($file) => $filesystem->isFile($file))
->first();

Expand Down

0 comments on commit aa78608

Please sign in to comment.