Skip to content

Commit 6922a91

Browse files
author
Alexandru Florea
committed
fix: Create production bundle BEFORE preparing output directory
This fixes the issue where the output directory was created first, causing the copy function to skip it during recursion.
1 parent 88c2d09 commit 6922a91

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Services/ObfuscationService.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ public function obfuscate(array $options = []): array
6565
$outputDir = isset($options['destination_override'])
6666
? $this->pathResolver->resolve($options['destination_override'])
6767
: $this->pathResolver->resolve($this->config['output_dir']);
68-
$this->prepareOutputDirectory($outputDir);
6968

70-
// If production-ready mode, copy entire project first
69+
// If production-ready mode, copy entire project first (before preparing output dir)
7170
if ($options['production_ready'] ?? false) {
7271
$this->createProductionBundle($outputDir, $options);
7372
}
7473

74+
$this->prepareOutputDirectory($outputDir);
75+
7576
// Process files
7677
$stats = $this->processFiles($files, $outputDir, $options);
7778

0 commit comments

Comments
 (0)