Skip to content
Latchkey

Pulumi "pulumi: command not found" on the runner in CI

The shell could not find a pulumi executable. The CLI is not preinstalled on standard runners, so a step that calls it directly fails unless an install step ran first and put it on PATH.

What this error means

A step running pulumi ... fails with "pulumi: command not found" and exit code 127, before any Pulumi work happens.

pulumi
/home/runner/work/_temp/script.sh: line 1: pulumi: command not found
Error: Process completed with exit code 127.

Common causes

The Pulumi CLI was never installed

The workflow calls pulumi directly without a setup step, and the CLI is not present on the base runner image.

The install did not update PATH for later steps

A manual install placed the binary somewhere not on PATH, so subsequent steps cannot find it.

How to fix it

Install the CLI with the setup action

  1. Add the official Pulumi setup step before any pulumi command.
  2. Optionally pin a CLI version for reproducibility.
  3. Re-run so pulumi is on PATH.
.github/workflows/ci.yml
- uses: pulumi/actions@v6
# or install the CLI directly:
- run: curl -fsSL https://get.pulumi.com | sh

Add the install location to PATH

If you install manually, export the bin directory so later steps can find the CLI.

Terminal
echo "$HOME/.pulumi/bin" >> "$GITHUB_PATH"

How to prevent it

  • Use the official Pulumi setup action in every workflow that runs Pulumi.
  • Pin the CLI version so behavior is reproducible.
  • Add the install directory to GITHUB_PATH for manual installs.

Frequently asked questions

What causes ""pulumi: command not found""?
The workflow calls pulumi directly without a setup step, and the CLI is not present on the base runner image.
How do I fix "pulumi: command not found"?
Install the CLI with the setup action

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card