Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid the warning: "The strawberry distribution is not available on this platform" and "fallback to the default distribution" #457

Closed
szabgab opened this issue Nov 18, 2020 · 2 comments

Comments

@szabgab
Copy link

szabgab commented Nov 18, 2020

I have a job like this:

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        runner: [ubuntu-latest, macos-latest, windows-latest]
        perl: [ '5.32' ]

    runs-on: ${{matrix.runner}}
    name: OS ${{matrix.runner}} Perl ${{matrix.perl}}

    steps:
    - uses: actions/checkout@v2

    - name: Set up perl
      uses: shogo82148/actions-setup-perl@v1
      with:
          perl-version: ${{ matrix.perl }}
          distribution: strawberry

I get a warning from GA "The strawberry distribution is not available on this platform" and also "fallback to the default distribution" for Linux and Mac.

Duplicating the step and using conditions helped me avoid the warnings

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        runner: [ubuntu-latest, macos-latest, windows-latest]
        perl: [ '5.32' ]

    runs-on: ${{matrix.runner}}
    name: OS ${{matrix.runner}} Perl ${{matrix.perl}}

    steps:
    - uses: actions/checkout@v2

    - name: Set up perl
      if: ${{ startsWith( matrix.runner, 'windows-' )  }}
      uses: shogo82148/actions-setup-perl@v1
      with:
          perl-version: ${{ matrix.perl }}
          distribution: strawberry

    - name: Set up perl
      if: ${{ ! startsWith( matrix.runner, 'windows-' )  }}
      uses: shogo82148/actions-setup-perl@v1
      with:
          perl-version: ${{ matrix.perl }}

Is there a better way to avoid this warning?

@tobyink
Copy link
Sponsor

tobyink commented Nov 18, 2020

    - name: Set up perl
      uses: shogo82148/actions-setup-perl@v1
      with:
          perl-version: ${{ matrix.perl }}
          distribution: ${{ ( startsWith( matrix.runner, 'windows-' ) && 'strawberry' ) || 'default' }}

@szabgab
Copy link
Author

szabgab commented Nov 18, 2020

@tobyink very nice

@szabgab szabgab closed this as completed Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants