creyD / prettier_action

GitHub action for running prettier on your projects pull requests
MIT License
269 stars 87 forks source link

[BUG] Process completed with exit code 1 #116

Open zethuman opened 1 year ago

zethuman commented 1 year ago

What exactly happened? Action is failed

image

Configuration file:

      - name: Prettify markdown code
        uses: creyD/prettier_action@v4.3
        with:
          dry: true
          prettier_options: --check --write --prose-wrap always **/*.md
          clean_node_folder: false

What should've happened? Success action complete

Where did you encounter the problem?

timsu92 commented 1 year ago

Looks like this is expected: https://github.com/creyD/prettier_action/blob/master/entrypoint.sh#L102

creyD commented 1 year ago

@timsu92 Thanks! @zethuman Yes I suppose this is expected, depending on your inputs. It seems like you have changes prettier would like to make, so it fails in a dry run. If there would be no outstanding changes, it should move through.

creyD commented 1 year ago

@zethuman Do you still consider this a bug?

igitur commented 1 year ago

Duplicate of #124?

igitur commented 1 year ago

This is caused by breaking changes in prettier v3. Use the prettier_version option to pin the prettier version to 2.x.x. Example at https://github.com/cwackerfuss/react-wordle/blob/5f6f622be86c40e8a46c8123cc98c3d6ca8719eb/.github/workflows/lint.yml#L17