Skip to content

Commit 571ad30

Browse files
committed
ACP2E-923: Compact strategy causes an invalid reference to an external domain when running SCD
1 parent 8635f6b commit 571ad30

File tree

1 file changed

+5
-2
lines changed
  • app/code/Magento/Deploy/Package/Processor/PreProcessor

1 file changed

+5
-2
lines changed

app/code/Magento/Deploy/Package/Processor/PreProcessor/Css.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ private function hasOverrides(PackageFile $parentFile, Package $package)
126126
* @param string $path
127127
* @return bool
128128
*/
129-
private function isLocal(string $path): bool {
129+
private function isLocal(string $path): bool
130+
{
130131
$pattern = '{^(file://(?!//)|/(?!/)|/?[a-z]:[\\\\/]|\.\.[\\\\/]|[a-z0-9_.-]+[\\\\/])}i';
131132
$result = preg_match($pattern, $path);
132133

@@ -152,7 +153,9 @@ private function buildMap($packagePath, $filePath, $fullPath)
152153

153154
$callback = function ($matchContent) use ($packagePath, $filePath, &$imports) {
154155
if ($this->isLocal($matchContent['path'])) {
155-
$importRelPath = $this->normalize(pathinfo($filePath, PATHINFO_DIRNAME) . '/' . $matchContent['path']);
156+
$importRelPath = $this->normalize(
157+
pathinfo($filePath, PATHINFO_DIRNAME) . '/' . $matchContent['path']
158+
);
156159
$imports[$importRelPath] = $this->normalize(
157160
$packagePath . '/' . pathinfo($filePath, PATHINFO_DIRNAME) . '/' . $matchContent['path']
158161
);

0 commit comments

Comments
 (0)