Skip to content

Commit

Permalink
Merge pull request #1184 from mxr576/patch-2
Browse files Browse the repository at this point in the history
Respect `--no-plugins` and `--no-scripts` option value follow up
  • Loading branch information
localheinz authored Oct 9, 2023
2 parents 59ffb86 + 02fb80c commit 9cd5346
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ For a full diff see [`2.37.0...main`][2.37.0...main].

### Fixed

- Adjusted `Command\NormalizeCommand` to respect `--no-ansi`, `--no-plugins`, `--no-scripts` options ([#1184]), by [@mxr576]
- Updated `composer/composer` ([#1188]), by [@localheinz]

## [`2.37.0`][2.37.0]
Expand Down
14 changes: 9 additions & 5 deletions src/Command/NormalizeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -523,15 +523,19 @@ private static function updateLockerInWorkingDirectory(
'--ignore-platform-reqs' => true,
'--lock' => true,
'--no-autoloader' => true,
'--no-plugins' => $input->getOption('no-plugins'),
'--no-scripts' => $input->getOption('no-scripts'),
'--working-dir' => $workingDirectory,
];

if ($input->hasParameterOption('--no-ansi')) {
$parameters = \array_merge($parameters, [
'--no-ansi' => true,
]);
$parameters[] = '--no-ansi';
}

if ($input->hasParameterOption('--no-plugins')) {
$parameters[] = '--no-plugins';
}

if ($input->hasParameterOption('--no-scripts')) {
$parameters[] = '--no-scripts';
}

return $application->run(
Expand Down

0 comments on commit 9cd5346

Please sign in to comment.