Skip to content

Conflict between --packages parameter and limit option in .drupal-updater.yml when launch command manually #34

@EduardoMorales-mrm

Description

@EduardoMorales-mrm

Description

After the last release, the .drupal-updater.yml configuration introduced a new limit option for the number of packages to update. However, when specifying the --packages parameter manually via the CLI, the command fails if limit is also defined in the configuration file.

Steps to Reproduce

  1. Define a .drupal-updater.yml file with a limit option, for example:

    limit: 10
  2. Run the command specifying packages manually:

    drupal-updater --environments="@self" --author="jenkins <jenkins@drupal-update>" \
    --packages="drupal/metatag,drupal/name,drupal/modal_page,drupal/pathauto,drupal/views_data_export"

Actual Behavior

Selected configuration file: .drupal-updater.yml
Configuration file found at .drupal-updater.yml

In Config.php line 242:
  The parameter packages and limit can't be used toguether.

Expected Behavior

The command-line parameter (--packages) should take priority over the configuration file.
If packages is explicitly defined, the tool should ignore the limit option from the config file, using it only as a default when --packages is not provided.

Suggested Fix

Allow both packages and limit to coexist, giving priority to command-line arguments and treating the config file as a fallback/default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions