Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI-1136: [push:artifact] include empty directories and symlinks #1606

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Command/Push/PushArtifactCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@
// @see https://git.drupalcode.org/project/drupal/-/blob/9.1.x/sites/default/default.settings.php#L295
$outputCallback('out', "Mirroring source files from $this->dir to $artifactDir");
$originFinder = $this->localMachineHelper->getFinder();
$originFinder->files()->in($this->dir)
$originFinder->in($this->dir)

Check warning on line 195 in src/Command/Push/PushArtifactCommand.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ // @see https://git.drupalcode.org/project/drupal/-/blob/9.1.x/sites/default/default.settings.php#L295 $outputCallback('out', "Mirroring source files from {$this->dir} to {$artifactDir}"); $originFinder = $this->localMachineHelper->getFinder(); - $originFinder->in($this->dir)->ignoreDotFiles(FALSE)->ignoreVCSIgnored(TRUE); + $targetFinder = $this->localMachineHelper->getFinder(); $targetFinder->in($artifactDir)->ignoreDotFiles(FALSE); $this->localMachineHelper->getFilesystem()->mirror($this->dir, $artifactDir, $originFinder, ['override' => TRUE, 'delete' => TRUE], $targetFinder);
// Include dot files like .htaccess.
->ignoreDotFiles(FALSE)
// Ignore VCS ignored files (e.g. vendor) to speed up the mirror (Composer will restore them later).
->ignoreVCSIgnored(TRUE);
$targetFinder = $this->localMachineHelper->getFinder();
$targetFinder->files()->in($artifactDir)->ignoreDotFiles(FALSE);
$targetFinder->in($artifactDir)->ignoreDotFiles(FALSE);

Check warning on line 201 in src/Command/Push/PushArtifactCommand.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $originFinder = $this->localMachineHelper->getFinder(); $originFinder->in($this->dir)->ignoreDotFiles(FALSE)->ignoreVCSIgnored(TRUE); $targetFinder = $this->localMachineHelper->getFinder(); - $targetFinder->in($artifactDir)->ignoreDotFiles(FALSE); + $this->localMachineHelper->getFilesystem()->mirror($this->dir, $artifactDir, $originFinder, ['override' => TRUE, 'delete' => TRUE], $targetFinder); $this->localMachineHelper->checkRequiredBinariesExist(['composer']); $outputCallback('out', 'Installing Composer production dependencies');
$this->localMachineHelper->getFilesystem()->mirror($this->dir, $artifactDir, $originFinder, ['override' => TRUE, 'delete' => TRUE], $targetFinder);

$this->localMachineHelper->checkRequiredBinariesExist(['composer']);
Expand Down