Skip to content

Commit

Permalink
Filter out nulls to prevent creating files for missing configs. Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Nov 30, 2020
1 parent 05932df commit 6b69105
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Console/Commands/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ protected function createFiles()
storage_path('statamic'),
];

foreach ($gitkeeps as $dir) {
foreach (array_filter($gitkeeps) as $dir) {
if (! File::exists($gitkeep = $dir.'/.gitkeep')) {
File::put($gitkeep, '');
$this->info("Created the <comment>[$dir]</comment> directory.");
}
}

foreach ($gitignores as $dir) {
foreach (array_filter($gitignores) as $dir) {
if (! File::exists($gitignore = $dir.'/.gitignore')) {
File::put($gitignore, "*\n!.gitignore");
$this->info("Created the <comment>[$dir]</comment> directory.");
Expand Down

0 comments on commit 6b69105

Please sign in to comment.