Skip to content

[Bug] "Couldn't find local version" when remote version is not found #313

@patrickschroeter

Description

@patrickschroeter

Describe the bug
When using the configuration below, the action fails with the error "Couldn't find local version" while it is the remote version which cannot be found.
If this is the desired behaviour it might be beneficial to update the docs which input describes the local/remote version path.

To Reproduce
create a github action with the following content and then run 'act -j check'.

name: Check
on:
  push:
    branches:
      - main

jobs:
  check:
    name: Check
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Check version changes
        uses: EndBug/version-check@v2.1.5
        id: check
        with:
          static-checking: localIsNew
          file-name: package.json
          file-url: https://github.com/EndBug/version-check/blob/main/package.json

Expected behavior
Expect "Couldn't find local version" when local version is not found and "Couldn't find remote version" when remote version is not found.

Additional content
Might be related with lines 105 in main.ts

if (!local || !remote) {
    endGroup()
    return setFailed(`Couldn't find ${local ? 'local' : 'remote'} version.`)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerstype: bugVerified problems that need to be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions