Skip to content

Commit 59c79d9

Browse files
committed
fix: test failures on macOS
`var` is a symlink to `private/var` on macOS
1 parent dfe4ad4 commit 59c79d9

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

system/Publisher/Publisher.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ final public function getScratch(): string
229229
if ($this->scratch === null) {
230230
$this->scratch = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . bin2hex(random_bytes(6)) . DIRECTORY_SEPARATOR;
231231
mkdir($this->scratch, 0700);
232+
$this->scratch = realpath($this->scratch) . DIRECTORY_SEPARATOR;
232233
}
233234

234235
return $this->scratch;

tests/system/Publisher/PublisherSupportTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ public function testWipe()
144144
{
145145
$directory = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . bin2hex(random_bytes(6));
146146
mkdir($directory, 0700);
147+
$directory = realpath($directory);
147148
$this->assertDirectoryExists($directory);
148149
config('Publisher')->restrictions[$directory] = ''; // Allow the directory
149150

0 commit comments

Comments
 (0)