Skip to content

Commit

Permalink
Fix: absent deleteVendorPackages CLI does not override extra config
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHenryIE committed Mar 19, 2024
1 parent 3ad5c9d commit 2f7ab8e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Console/Commands/Compose.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ protected function loadProjectComposerPackage(InputInterface $input): void

$config = $this->projectComposerPackage->getStraussConfig($input);

$isDeleteVendorPackagesCommandLine =
($input->hasOption('deleteVendorPackages')
&& $input->getOption('deleteVendorPackages') === 'true')
|| ($input->hasOption('delete_vendor_packages')
&& $input->getOption('delete_vendor_packages') === 'true');

$config->setDeleteVendorPackages($isDeleteVendorPackagesCommandLine);
if ($input->hasOption('deleteVendorPackages')) {
$isDeleteVendorPackagesCommandLine = $input->getOption('deleteVendorPackages') === 'true';
$config->setDeleteVendorPackages($isDeleteVendorPackagesCommandLine);
} elseif ($input->hasOption('delete_vendor_packages')) {
$isDeleteVendorPackagesCommandLine = $input->getOption('delete_vendor_packages') === 'true';
$config->setDeleteVendorPackages($isDeleteVendorPackagesCommandLine);
}

$this->config = $config;

Expand Down

0 comments on commit 2f7ab8e

Please sign in to comment.