From 72b99b528dacb54d2c5257044aeecc17a2f043f5 Mon Sep 17 00:00:00 2001
From: Philippe Auriach
Date: Mon, 13 Mar 2023 19:03:46 +0100
Subject: [PATCH] Fix pattern (#5)
---
action.yml | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/action.yml b/action.yml
index 8b5a9bc..7d63325 100644
--- a/action.yml
+++ b/action.yml
@@ -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'