Skip to content
Snippets Groups Projects

Issue #3304365: Do not check excluded folders for symlinks

Merged Adam G-H requested to merge issue/automatic_updates-3304365:3304365-do-not-check into 8.x-2.x
Compare and
1 file
+ 9
1
Compare changes
  • Side-by-side
  • Inline
@@ -13,6 +13,7 @@ use Drupal\package_manager\PathLocator;
use PhpTuf\ComposerStager\Domain\Exception\PreconditionException;
use PhpTuf\ComposerStager\Domain\Service\Precondition\CodebaseContainsNoSymlinksInterface;
use PhpTuf\ComposerStager\Infrastructure\Factory\Path\PathFactoryInterface;
use PhpTuf\ComposerStager\Infrastructure\Value\PathList\PathList;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
@@ -96,8 +97,15 @@ class SymlinkValidator implements EventSubscriberInterface {
}
$stage_dir = $this->pathFactory->create($stage_dir);
if ($event instanceof PreCreateEvent || $event instanceof PreApplyEvent) {
$exclusions = new PathList($event->getExcludedPaths());
}
else {
$exclusions = NULL;
}
try {
$this->precondition->assertIsFulfilled($active_dir, $stage_dir);
$this->precondition->assertIsFulfilled($active_dir, $stage_dir, $exclusions);
}
catch (PreconditionException $e) {
$message = $e->getMessage();
Loading