Skip to content

Commit 8d05f7c

Browse files
committed
[FIX] Tmp directory for Tailwind Builder.
1 parent 7770463 commit 8d05f7c

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

core/src/Services/TailwindService.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,16 @@ public function compile(string $package, bool $forceRebuild = false): string
5151
throw new RuntimeException("Cannot create build dir for «{$package}».");
5252
}
5353

54-
$proc = new Process([
55-
$this->binary,
56-
'-i', $input,
57-
'-o', $output,
58-
'--minify',
59-
]);
54+
$tmpPath = EVO_CORE_PATH . 'storage/tmp';
55+
if (!is_dir($tmpPath)) {
56+
mkdir($tmpPath, 0775, true);
57+
}
58+
59+
$proc = new Process(
60+
[$this->binary, '-i', $input, '-o', $output, '--minify'],
61+
null,
62+
['TMPDIR' => $tmpPath] + $_ENV
63+
);
6064
$proc->run();
6165

6266
if (!$proc->isSuccessful()) {

0 commit comments

Comments
 (0)