Skip to content

Commit

Permalink
Use injected Filesystem instance instead functions
Browse files Browse the repository at this point in the history
  • Loading branch information
SenseException committed Jul 18, 2023
1 parent 137c084 commit f63db3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/WebsiteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ private function createVersionAlias(string $dir, ProjectVersion $version, string

chdir($dir);

if (file_exists($alias)) {
unlink($alias);
if ($this->filesystem->exists($alias)) {
$this->filesystem->remove($alias);
}

if (file_exists($version->getSlug())) {
symlink($version->getSlug(), $alias);
if ($this->filesystem->exists($version->getSlug())) {
$this->filesystem->symlink($version->getSlug(), $alias);
}

if ($cwd === false) {
Expand Down

0 comments on commit f63db3c

Please sign in to comment.