Skip to content

Commit

Permalink
Fix error cause by missing target dir when copying custom icons
Browse files Browse the repository at this point in the history
  • Loading branch information
emanueljacob committed Jan 4, 2024
1 parent 5bddccf commit 3413ef2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Commands/Build.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ private function copyIcons(): void
$targetDirectory = base_path('vendor/area17/twill/frontend/icons-custom');
$originalIcons = config('twill.block_editor.core_icons');

if (!file_exists($targetDirectory)) {
mkdir($targetDirectory);

Check warning on line 241 in src/Commands/Build.php

View check run for this annotation

Codecov / codecov/patch

src/Commands/Build.php#L241

Added line #L241 was not covered by tests
}

foreach (config('twill.block_editor.directories.source.icons') as $iconDirectory) {
// We do not want to process original icons.
if ($iconDirectory !== $originalIcons) {
Expand Down

0 comments on commit 3413ef2

Please sign in to comment.