Skip to content

Commit

Permalink
fix: multiline output (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
dreit-p authored Feb 1, 2024
1 parent 9e27606 commit d42c432
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,19 @@ runs:
- name: Running Prettier
id: prettier-run
shell: bash
run: echo "prettier-output=$(prettier --list-different --config ${{ inputs.config_path }} --ignore-path ${{ inputs.ignore_path }} --no-error-on-unmatched-pattern ${{ inputs.file_pattern }})" >> $GITHUB_OUTPUT
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "prettier-output<<$EOF" >> $GITHUB_OUTPUT
echo "$(prettier --list-different --config ${{ inputs.config_path }} --ignore-path ${{ inputs.ignore_path }} --no-error-on-unmatched-pattern ${{ inputs.file_pattern }})" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
- name: Fail On Error
id: fail-on-error
if: steps.prettier-run.outputs.prettier-output != 0 && steps.prettier-run.outputs.prettier-output != '' && inputs.fail_on_error
shell: bash
run: exit 1
run: |
echo "Found errors"
exit 1
branding:
icon: 'search'
Expand Down

0 comments on commit d42c432

Please sign in to comment.