Skip to content

Commit

Permalink
ClearCache task: Try fix permissions before clear whole temp dir. (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
Langriklol authored Jan 31, 2022
1 parent 3b37f5d commit 52f4b01
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/InteractiveComposer/Task/ClearCacheTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ public function run(): bool

$tempPath = \dirname(__DIR__, 6) . '/temp';
echo 'Path: ' . $tempPath;
try {
FileSystem::makeWritable($tempPath);
} catch (\Throwable) {
// Silence is golden.
}
FileSystem::delete($tempPath);
FileSystem::createDir($tempPath);
FileSystem::makeWritable($tempPath);

return true;
}
Expand Down

0 comments on commit 52f4b01

Please sign in to comment.