Skip to content

[WARNING]Version "1.22.0" of Google Java Format cannot be found. Fallback to latest. | But it actually exists #32

@BeshEater

Description

@BeshEater

Recently I tried to set up a new GitHub Action flow using googlejavaformat-action, it works great, but I always get this particular warning in logs: [warning]Version "1.22.0" of Google Java Format cannot be found. Fallback to latest. but I'm pretty sure it actually exists, and it also downloads the same version on the next step.
See full logs:

##[group]Run axel-op/googlejavaformat-action@v3
with:
  args: --skip-reflowing-long-strings --set-exit-if-changed
  version: 1.22.0
  skip-commit: true
  github-token: ***
  files: **/*.java
env:
  GIT_USER_EMAIL: actions@github.com
  GIT_USER_NAME: GitHub Actions
  .....
  JAVA_HOME: /opt/hostedtoolcache/Java_Corretto_jdk/17.0.11-9.1/x64
  JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Corretto_jdk/17.0.11-9.1/x64
##[endgroup]
##[warning]Version "1.22.0" of Google Java Format cannot be found. Fallback to latest.
Version of JDK: 17
##[group]Downloading Google Java Format
Downloading executable to /home/runner/google-java-format.jar
[command]/opt/hostedtoolcache/Java_Corretto_jdk/17.0.11-9.1/x64/bin/java --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -jar /home/runner/google-java-format.jar --version
google-java-format: Version 1.22.0
##[endgroup]

Github Action Config:

# Lint the code (fail if not successful)
- name: Linting
  uses: axel-op/googlejavaformat-action@v3
  with:
    args: "--skip-reflowing-long-strings --set-exit-if-changed"
    version: 1.22.0
    skip-commit: true
    github-token: ${{ secrets.GITHUB_TOKEN }}

What could cause a warning like that? How could I provide a specific version then?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions