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] syntax error near unexpected token `then' #74

Closed
mhaamann opened this issue Dec 2, 2021 · 5 comments · Fixed by #75
Closed

[BUG] syntax error near unexpected token `then' #74

mhaamann opened this issue Dec 2, 2021 · 5 comments · Fixed by #75
Labels
bug Something isn't working

Comments

@mhaamann
Copy link

mhaamann commented Dec 2, 2021

I'm getting the following error when running with a standard prettier configuration

/home/runner/work/_actions/creyD/prettier_action/v4.1/entrypoint.sh: line 123: syntax error near unexpected token `then'
Error: Process completed with exit code 2.

Looks like the line was changed in commit dbdc557 any chance you can spot the error. It looks fine for me

Using the following .yml file:

name: Continuous Integration

on:
  pull_request:
    branches: [master]

jobs:
  prettier:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2
        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.1
        with:
          prettier_version: '2.3.2'
          # This part is also where you can pass other options, for example:
          prettier_options: --write --config .prettierrc **/*.{js,jsx,less,ts,tsx}
          only_changed: True
@mhaamann mhaamann added the bug Something isn't working label Dec 2, 2021
@trevcarr95
Copy link

am also seeing the same issue when trying to upgrade to 4.1

@bananabrann
Copy link

bananabrann commented Dec 3, 2021

am also seeing the same issue when trying to upgrade to 4.1

Same here. I've downgraded to 4.0 and it appears to be fine

- name: Prettify code
  uses: creyD/prettier_action@v4.0

@creyD
Copy link
Owner

creyD commented Dec 4, 2021

@insyri this appears to be the line which we changed in the last update. Could you please take a look at it?

@insyri
Copy link
Contributor

insyri commented Dec 4, 2021

Noticed (5 mins ago, forgot to comment), I'm looking into this right now, my suspects are a syntactical error.

@insyri insyri mentioned this issue Dec 4, 2021
creyD added a commit that referenced this issue Dec 6, 2021
@creyD creyD mentioned this issue Dec 6, 2021
creyD added a commit that referenced this issue Dec 6, 2021
@creyD
Copy link
Owner

creyD commented Dec 6, 2021

Closed in v4.1.1 thanks to @insyri!

@creyD creyD closed this as completed Dec 6, 2021
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

Successfully merging a pull request may close this issue.

5 participants