public function Cleaner::clean in Automatic Updates 8.2
File
- src/ComposerStager/Cleaner.php, line 56
Class
- Cleaner
- Defines a cleaner service that makes the staged site directory writable.
Namespace
Drupal\automatic_updates\ComposerStager
Code
public function clean(string $stagingDir, ?ProcessOutputCallbackInterface $callback = NULL, ?int $timeout = 120) : void {
$site_dir = implode(DIRECTORY_SEPARATOR, [
$stagingDir,
$this->pathLocator
->getWebRoot() ?: '.',
$this->sitePath,
]);
if ($this
->directoryExists($site_dir)) {
(new Filesystem())
->chmod($site_dir, 0777);
}
$this->decorated
->clean($stagingDir, $callback, $timeout);
}