advanced-security / set-codeql-language-matrix

Automatically set the CodeQL matrix job using the languages in your repository.
MIT License
11 stars 7 forks source link

Bugfix for #5: Altered output breaks functionality with strategy #7

Closed LeShadow closed 4 months ago

LeShadow commented 5 months ago

This PR fixes the bug that was in #5 .

The altered output from v1.1.0 gives an error when you use the output from the action in this type of context:

strategy:
      fail-fast: false
      matrix:
        language: ${{ fromJSON(needs.create-matrix.outputs.matrix) }}

It cannot parse the JSON properly and thus the parsing ends in an empty value as well. This fix, which was mentioned in #5 should fix that.

Credit to the proposed fix by @gurucloudsec

leftrightleft commented 4 months ago

@CallMeGreg Can you take a look at this PR? This change reverts the updates you made in this PR

CallMeGreg commented 4 months ago

@leftrightleft LGTM 👍