Match paths sent to theme:sync more exactly (#5334)
`artisan theme:sync --target=database --force --paths=layouts/,pages/,partials/` But at the moment it also synchronizes paths that should not be synchronized. For example: `content/static-pages/`. Because here the pattern applies to `pages/`. The fix is that the pattern starts at the beginning of the line. Co-authored-by: Heiko Böhme <hboehme@menadwork.com>
This commit is contained in:
parent
00849268ed
commit
96fd2ec657
|
|
@ -105,7 +105,7 @@ class ThemeSync extends Command
|
|||
|
||||
foreach ($userPaths as $userPath) {
|
||||
foreach ($themePaths as $themePath) {
|
||||
$pregMatch = '/' . str_replace('/', '\/', $userPath) . '/i';
|
||||
$pregMatch = '/^' . str_replace('/', '\/', $userPath) . '/i';
|
||||
|
||||
if ($userPath === $themePath || preg_match($pregMatch, $themePath)) {
|
||||
$paths[] = $themePath;
|
||||
|
|
|
|||
Loading…
Reference in New Issue