Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Problem --writer #115

Open
vt89 opened this issue Feb 21, 2023 · 4 comments
Open

[BUG] Problem --writer #115

vt89 opened this issue Feb 21, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@vt89
Copy link

vt89 commented Feb 21, 2023

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/prettier_action@v4.2
        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 vt89 added the bug Something isn't working label Feb 21, 2023
@whoabuddy
Copy link

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

@Tritium-VLK
Copy link

Also having problems that prettier is no longer found.

@whoabuddy
Copy link

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

@Lakshan-Madushanka
Copy link

Upgrading to version 4.3 solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants