bluehorndigital / setup-drupal

GitHub Action to setup Drupal for testing an extension
MIT License
19 stars 3 forks source link

Specifying multiple dependencies may not be functioning properly #16

Open lal65 opened 1 year ago

lal65 commented 1 year ago

Hey Matt! Thanks for this wonderful tool.

I'm running into what might be PEBKAC, but on the off-chance that it isn't, I wanted to open an issue. Here's what I'm trying to run:

- name: Setup Drupal action
  uses: bluehorndigital/setup-drupal@v1.0.4
  with:
    version: ${{ matrix.drupal-core }}
    dependencies: 'drupal/coder:=8.3.13 drupal/webform:^6.0'

and here's what I get:

Could not parse version constraint drupal/webform:^6.0: Invalid version string "drupal/webform:^6.0"

In my case, the webform module is a hard dependency on the module that I'm testing. Unfortunately, the repository that's acting up is not public (for security reasons, it can't be public yet).

I hope all has been well with you and yours.

lal65 commented 1 year ago

As a workaround, I am able to do this, however:

      - name: Setup Drupal action
        uses: bluehorndigital/setup-drupal@v1.0.4
        with:
          version: ${{ matrix.drupal-core }}
          dependencies: 'drupal/coder:=8.3.13'
      - name: Workaround to install webform module
        run: cd ~/drupal && composer require drupal/webform

:+1:

mglaman commented 1 year ago

Looks like it is here:

    if (extraDependencies) {
        commands.push(['require', extraDependencies]);
    }

This needs to do a split on , or allow an array as well.