Skip to content

Commit b3f89e8

Browse files
committed
fix invalid path while publishing asset on Windows
1 parent b98c75a commit b3f89e8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/InspireCmsServiceProvider.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,11 @@ protected function registerStubs()
563563
}
564564

565565
foreach (app(Filesystem::class)->allFiles(__DIR__ . '/../stubs/SampleAssets/Assets') as $file) {
566-
$dir = str($file->getRelativePath())->explode('/')
567-
->map(fn ($path) => (string) str($path)->kebab())
566+
$dir = str($file->getRelativePath())
567+
->replace('\\', '/')
568+
->explode('/')
569+
->filter(fn ($path) => filled($path))
570+
->map(fn ($path) => Str::kebab($path))
568571
->implode('/');
569572
$fullPath = (string) str(public_path($dir))
570573
->finish('/')

0 commit comments

Comments
 (0)