Skip to content

Commit

Permalink
[docker:init] Apply chmod to directory before/after generate files. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas committed Mar 21, 2018
1 parent 037dcec commit 21f311d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Command/DotenvInitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ protected function copySettingsFile(Filesystem $fs)
$destinationFile = $this->drupalFinder
->getDrupalRoot() . '/sites/default/settings.php';

$directory = dirname($sourceFile);
$permissions = fileperms($directory);
$fs->chmod($directory, 0755);

$this->validateFileExists($fs, $sourceFile);
$this->backUpFile($fs, $destinationFile);

Expand Down Expand Up @@ -138,6 +142,8 @@ protected function copySettingsFile(Filesystem $fs)
drupal_rewrite_settings($settings, $destinationFile);

$this->showFileCreatedMessage($destinationFile);

$fs->chmod($directory, $permissions);
}

private function copyEnvFile(Filesystem $fs)
Expand Down

0 comments on commit 21f311d

Please sign in to comment.