prettier_action icon indicating copy to clipboard operation
prettier_action copied to clipboard

[BUG] Problem --writer

Open vt89 opened this issue 2 years ago • 4 comments

What exactly happened? The following workflow gives this error:

Installing prettier...
Checking plugin: prettier-plugin-apex
Prettifying files...
Files:
/home/runner/work/_actions/creyD/prettier_action/v4.2/entrypoint.sh: line 74: prettier: command not found
Problem running prettier with --write
Error: Process completed with exit code 1.

Workflow:

name: Prettier Apex
on:
  pull_request:
    types: [opened, reopened, synchronize]
  workflow_dispatch:
jobs:
  analyze:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          # Make sure the actual branch is checked out when running on pull requests
          ref: ${{ github.head_ref }}
          # This is important to fetch the changes to the previous commit
          fetch-depth: 0

      - name: Prettify code
        uses: creyD/[email protected]
        with:
          # This part is also where you can pass other options, for example:
          only_changed: true
          prettier_plugins: "prettier-plugin-apex"
          prettier_options: --write

I have tried many times using different syntax for prettier_options but the issue is always the same.

vt89 avatar Feb 21 '23 22:02 vt89

I'm getting a similar error in this PR where we're just trying to fail on check, without any plugins. Seems to be a bigger issue?

https://github.com/casey/ord/pull/1594#issuecomment-1439232874

Same error:

Installing prettier...
Prettifying files...
Files:
/home/runner/work/_actions/creyD/prettier_action/v4.2/entrypoint.sh: line 74: prettier: command not found
Problem running prettier with --check .
Error: Process completed with exit code 1.

Workflow config for reference

whoabuddy avatar Feb 22 '23 11:02 whoabuddy

Also having problems that prettier is no longer found.

Tritium-VLK avatar Feb 23 '23 15:02 Tritium-VLK

@Tritium-VLK did you try with 4.3? See my updated comment here

whoabuddy avatar Feb 23 '23 17:02 whoabuddy

Upgrading to version 4.3 solved the issue.

Lakshan-Madushanka avatar Feb 25 '23 08:02 Lakshan-Madushanka