tj-actions / eslint-changed-files

:octocat: Github action to run ESLint on changed pull request files with support for reporting errors via Github checks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Error: sh: command not found

orbtl opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I'm using the latest release

Describe the bug?

Action failing after Run reviewdog/action-setup@v1 and Run set -eu steps with Error: sh: command not found

To Reproduce

Running in a self-hosted runner on Windows Server 2016 as a service, github runner version 2.312.0.
Action .yml config file is as follows:

name: EsLint

on:
  push:
    branches: [ "develop" ]
  pull_request:
    branches: [ "develop", "master" ]

jobs:
  build:

    runs-on: [ self-hosted ]

    steps:
    - uses: actions/checkout@v4
    
    - name: Setup Node
      uses: actions/setup-node@v4
      with:
        node-version: 20.x
    
    - name: Install Dependencies
      run: npm i
      working-directory: ./Insights.Web/ClientApp
      env:
        CXE_NPM_TOKEN: ${{ secrets.CXE_NPM_TOKEN }}
        
    - name: Run eslint on changed files
      uses: tj-actions/eslint-changed-files@v23
      with:
        path: "Insights.Web/ClientApp/"
        config_path: ".eslintrc"
        ignore_path: ".eslintignore"
        extra_args: "--max-warnings=0"

On commit or pull request, action runs and fails with the logs supplied below. Not sure what is causing this or how to fix

What OS are you seeing the problem on?

windows-latest or windows-2022

Expected behavior?

Expected linter to run

Relevant log output

Run tj-actions/eslint-changed-files@v23
  with:
    path: Insights.Web/ClientApp/
    config_path: .eslintrc
    ignore_path: .eslintignore
    extra_args: --max-warnings=0
    fail_on_error: false
    token: ***
    all_files: false
    file_extensions: **/*.{ts,tsx,js,jsx}
  
    skip_annotations: false
    level: error
    reporter: github-pr-review
    filter_mode: added
Run reviewdog/action-setup@v1
  with:
    reviewdog_version: v0.14.2
Run set -eu
  set -eu
  "$GITHUB_ACTION_PATH/install.sh"
  Error: sh: command not found

Has all relevant logs been included?

  • I've included all relevant logs

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Hi @orbtl, this doesn't appear to be a bug with this action, it's likely a bug with your self-hosted runner version. I'll recommend creating an issue in the runner repository instead.

Hi @orbtl, this doesn't appear to be a bug with this action, it's likely a bug with your self-hosted runner version. I'll recommend creating an issue in the runner repository instead.

Hi @jackton1 , I started out on github runner version 2.308.0 and when I encountered this bug I thought maybe it was because the runner was out of date, so I updated it to the newest version, 2.312.0 and still had the same issue, which is when I submitted this bug issue.

Could you please recommend a github runner version that is compatible with this repo?