Skip to content

Commit

Permalink
Minor variable / comment refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Sep 18, 2018
1 parent d48b8d2 commit e4c08d5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Robo/Commands/Setup/BuildCommand.php
Expand Up @@ -39,7 +39,8 @@ public function drupalInstall() {
}

/**
* Set correct permissions for files and folders in docroot/sites/*.
* Set correct permissions for directories (755) and files (644) in
* docroot/sites/[site] (excluding docroot/sites/[site]/files).
*/
protected function setSitePermissions() {
$taskFilesystemStack = $this->taskFilesystemStack();
Expand All @@ -58,15 +59,15 @@ protected function setSitePermissions() {
->files()
->depth('< 1')
->exclude('files');
foreach ($files->getIterator() as $dir) {
$taskFilesystemStack->chmod($dir->getRealPath(), 0644);
foreach ($files->getIterator() as $file) {
$taskFilesystemStack->chmod($file->getRealPath(), 0644);
}

$taskFilesystemStack->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERBOSE);
$result = $taskFilesystemStack->run();

if (!$result->wasSuccessful()) {
throw new BltException("Unable to set permissions for site directories.");
throw new BltException("Unable to set permissions for site directories and files.");
}
}

Expand Down

0 comments on commit e4c08d5

Please sign in to comment.