Skip to content

ReferenceError: token is not defined when downloading Bazelisk #59

@kcon-stackav

Description

@kcon-stackav

I'm seeing the following error when using the latest 0.12.0 version of this GitHub Action:

Setup Bazelisk
  Error: ReferenceError: token is not defined
      at downloadBazelisk (/runner/_work/_actions/bazel-contrib/setup-bazel/0.12.0/dist/index.js:94:1)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at setupBazelisk (/runner/_work/_actions/bazel-contrib/setup-bazel/0.12.0/dist/index.js:43:1)

I think this may be a regression introduced via 438b351. In that commit, I saw a const token assignment was replaced with reading an environment variable, but I believe one of the existing token references was missed:

const downloadPath = await tc.downloadTool(url, undefined, `token ${token}`)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions