Skip to content

Commit 00adf24

Browse files
committed
build(scoper): fix lib-vendor-organizer run on MacOS
- apparently they case sensitivized their file system somewhat… - now we have an inbetween steps in a temporary build directory to avoit the troubles Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
1 parent 3eb13ea commit 00adf24

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.lib-vendor-organizer.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
if ($stripNamespacePrefix !== '' && strpos($namespace, $stripNamespacePrefix) === 0) {
5454
$namespace = str_replace($stripNamespacePrefix, '', $namespace);
5555
}
56-
$destination = $sourceDirectory . str_replace('\\', '/', $namespace);
56+
$destination = $sourceDirectory . '/build/' . str_replace('\\', '/', $namespace);
5757
if (file_exists($destination)) {
5858
rmdir_recursive($destination);
5959
}
@@ -69,6 +69,14 @@
6969
rmdir_recursive($organizationDir);
7070
}
7171

72+
foreach(scandir($sourceDirectory . 'build/') as $file) {
73+
if (!is_dir($sourceDirectory . 'build/' . $file) || $file === '.' || $file === '..') {
74+
continue;
75+
}
76+
rename($sourceDirectory . 'build/' . $file, $sourceDirectory . '/' . $file);
77+
}
78+
rmdir($sourceDirectory . 'build');
79+
7280
function rmdir_recursive($dir) {
7381
foreach(scandir($dir) as $file) {
7482
if ('.' === $file || '..' === $file) {

0 commit comments

Comments
 (0)