Skip to content

Commit

Permalink
Fix pattern (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippeauriach authored Mar 13, 2023
1 parent 9e27606 commit 72b99b5
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,15 @@ runs:
- name: Installing Prettier
id: prettier-install
shell: bash
run: npm install --global prettier@${{ inputs.prettier_version }}
run: |
npm install --global prettier@${{ inputs.prettier_version }}
echo "prettier version: $(prettier --version)"
- 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

- 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: |
prettier --check --config ${{ inputs.config_path }} --ignore-path ${{ inputs.ignore_path }} --no-error-on-unmatched-pattern "${{ inputs.file_pattern }}"
branding:
icon: 'search'
Expand Down

0 comments on commit 72b99b5

Please sign in to comment.