Skip to content

Commit d51136b

Browse files
committed
Fixes to bodge
1 parent f889c31 commit d51136b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build/build.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,15 @@ function clean_composer(string $dir)
453453
$doNotPatchFile = in_array(trim($fileName), $doNotPatch);
454454
$doNotPackageBaseFolder = in_array($baseFolderName, $doNotPackage);
455455
$doNotPatchBaseFolder = in_array($baseFolderName, $doNotPatch);
456-
$dirtyHackForMediaCheck = in_array($folderPath[0] . '/' . $folderPath[1] . '/' . $folderPath[2] . '/' . $folderPath[3], 'administrator/components/com_media/resources');
456+
$dirtyHackForMediaCheck = false;
457+
458+
// The raw files for the vue files are not packaged but are not a top level directory so aren't handled by the
459+
// above checks. This is dirty but a fairly performant fix for now until we can come up with something better.
460+
if (count($folderPath) >= 4)
461+
{
462+
$fullPath = [$folderPath[0] . '/' . $folderPath[1] . '/' . $folderPath[2] . '/' . $folderPath[3]];
463+
$dirtyHackForMediaCheck = in_array('administrator/components/com_media/resources', $fullPath);
464+
}
457465

458466
if ($dirtyHackForMediaCheck || $doNotPackageFile || $doNotPatchFile || $doNotPackageBaseFolder || $doNotPatchBaseFolder)
459467
{

0 commit comments

Comments
 (0)