reviewdog / action-tflint

Run tflint with reviewdog on pull requests to enforce best practices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reviewdog: failed to run 'git rev-parse --show-prefix': exit status 128

denzhel opened this issue · comments

Hi there,

I have the same issue in this link:
#21

This is the setup I use

    steps:
    - uses: actions/checkout@v2
    - name: tflint
      uses: reviewdog/action-tflint@master
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        reporter: github-pr-review # Optional. Change reporter
        filter_mode: "nofilter" # Optional. Check all files, not just the diff
        flags: "--module" # Optional. Add custom tflint flags

and I still get:

reviewdog: failed to run 'git rev-parse --show-prefix': exit status 128

Please help :)

Hey!

With the mess that was last week, I totally missed this. My apologies.

Hm... you are cloning the repo, but git still complains. 128 is a generic error code from what I could find.

Let's take this step-by-step:

  1. What event is triggering the workflow? Is the repo actually cloned?
  2. Could you run a ls -la and git status between the checkout and tflint step to ensure the files are there?

@denzhel ping 🙂

@Vlaaaaaaad Hi !!

Let me update you about the steps you've requested.

I will report back but I think I know what the problem is.

I tried using your action in a workflow that is triggered by a issue comment which checks out to master instead of the branch and used older version of git that did not allow to run git commands.

Ever since, I've installed the latest git version + performed git checkout to my branch instead of master.

Please don't close this yet, until I update you with my findings..

Yup, that could be it. GitHub Actions are very... particular about what code they pull and how.

Sure, I'll keep the issue open. There's no rush.

@denzhel any updates on this? Did you manage to get it working?

Closing due to timeout. Feel free to re-open if it's still relevant!

@denzhel any updates on this? Did you manage to get it working?

was this solved? As I am facing this now!

This seems to be a generic reviewdog issue and there already is an open issue here: reviewdog/reviewdog#1158

Better continue discussing there.