Skip to content

fix: install Gemini CLI into runner temp prefix#528

Open
beanscg wants to merge 1 commit into
google-github-actions:mainfrom
beanscg:bean-labs-run-gemini-cli-temp-prefix
Open

fix: install Gemini CLI into runner temp prefix#528
beanscg wants to merge 1 commit into
google-github-actions:mainfrom
beanscg:bean-labs-run-gemini-cli-temp-prefix

Conversation

@beanscg

@beanscg beanscg commented Jun 8, 2026

Copy link
Copy Markdown

Addresses #332.

This changes the Gemini CLI install step to use a runner-temp install prefix instead of relying on the system npm global prefix. On locked-down self-hosted runners, the default global prefix can be unwritable, which can cause the npm install --global @google/gemini-cli@latest step to fail before gemini is available on PATH.

Changes:

  • Create a temporary install prefix under ${RUNNER_TEMP:-${HOME}}/gemini-cli-install.
  • Add the install prefix bin directory to the current step PATH and to GITHUB_PATH for later steps.
  • Use npm install --global --prefix "${GEMINI_CLI_INSTALL_PREFIX}" for npm installs.
  • Point PNPM_HOME at the same bin directory for the pnpm global install path.
  • Apply the same temp-prefix behavior when installing a built Gemini CLI checkout from a branch/tag/commit.

Validation:

  • ruby -e "require 'yaml'; YAML.load_file('action.yml')"
  • npm install completed. Local Node v22.11.0 emitted an engine warning for Vite requiring ^20.19.0 || >=22.12.0, but install completed.
  • Local npm-prefix install simulation:
    • created a temp gemini-cli-install prefix
    • installed @google/gemini-cli@latest with --global --prefix
    • command -v gemini resolved to the temp prefix
    • gemini --version returned 0.45.2
  • npm run format:check
  • git diff --check

@beanscg beanscg requested review from a team as code owners June 8, 2026 18:08
@google-cla

google-cla Bot commented Jun 8, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant