Skip to content
Latchkey

GitHub Actions "Process completed with exit code 127" in a composite action

Exit code 127 means "command not found". In a composite action it usually means a tool the action assumed is installed is missing, or PATH changes from earlier steps are not visible.

What this error means

A step inside a composite action fails with exit code 127 and a "command not found" message for a binary the action expected to be available.

github-actions
/home/runner/work/_temp/abc.sh: line 3: jq: command not found
Error: Process completed with exit code 127.

Common causes

Tool not installed

The composite action invokes a binary (jq, yq, a CLI) that is not present on the runner and was never installed.

PATH set in a prior step not propagated

A tool installed by an earlier step is on PATH only if exported via GITHUB_PATH; a plain export does not carry over.

How to fix it

Install the tool and export PATH correctly

  1. Add a step that installs the required binary before it is used.
  2. Export new PATH entries via GITHUB_PATH, not a shell export.
  3. Verify availability with command -v before invoking.
action.yml (composite)
- shell: bash
  run: |
    echo "/opt/tool/bin" >> "${GITHUB_PATH}"
    command -v jq || sudo apt-get install -y jq

How to prevent it

  • Document and install the tools a composite action depends on.
  • Use GITHUB_PATH to make installed binaries visible to later steps.
  • Probe with command -v before calling external tools.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →