Skip to content

Commit 33b6729

Browse files
author
github-actions
committed
Merge pull request #482 from hydephp/code-cleanup
Fix validation bug in rebuild command hydephp/develop@81c7d26
1 parent 009c3a2 commit 33b6729

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Commands/HydeRebuildStaticSiteCommand.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ public function sanitizePathString(string $path): string
9898
public function validate(): void
9999
{
100100
if (! (
101-
str_starts_with($this->path, Hyde::pathToRelative(Hyde::getDocumentationPagePath())) ||
102-
str_starts_with($this->path, Hyde::pathToRelative(Hyde::getMarkdownPostPath())) ||
103101
str_starts_with($this->path, Hyde::pathToRelative(Hyde::getBladePagePath())) ||
104-
str_starts_with($this->path, Hyde::pathToRelative(Hyde::getMarkdownPostPath()))
102+
str_starts_with($this->path, Hyde::pathToRelative(Hyde::getMarkdownPagePath())) ||
103+
str_starts_with($this->path, Hyde::pathToRelative(Hyde::getMarkdownPostPath())) ||
104+
str_starts_with($this->path, Hyde::pathToRelative(Hyde::getDocumentationPagePath()))
105105
)) {
106106
throw new Exception("Path [$this->path] is not in a valid source directory.", 400);
107107
}

0 commit comments

Comments
 (0)