Skip to content

Errors in post-install when called via composite action #253

Description

@haines
2026-05-08T14:40:00.6826488Z ##[group]Run pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d
2026-05-08T14:40:00.6826992Z with:
2026-05-08T14:40:00.6827214Z   cache: true
2026-05-08T14:40:00.6827527Z   cache_dependency_path: frontend/pnpm-lock.yaml
2026-05-08T14:40:00.6827954Z   package_json_file: frontend/package.json
2026-05-08T14:40:00.6828325Z   run_install: cwd: frontend

2026-05-08T14:40:00.6828652Z   dest: ~/setup-pnpm
2026-05-08T14:40:00.6828919Z   standalone: false
2026-05-08T14:40:00.6830293Z ##[endgroup]

...

2026-05-08T14:42:24.9157219Z Post job cleanup.
2026-05-08T14:42:25.1099335Z ##[error]Error for input "run_install" = cwd:
2026-05-08T14:42:25.1103403Z ##[error]Errors: [object Object]

There seems to be two problems here. One is that printing the Zod error here doesn't work properly so we just get [object Object] in the logs. I guess that needs a JSON.stringify or something.

The other one is that it seems to have received two different inputs for the initial run of the action and the post-install step 🤯 This may be because we call pnpm/action-setup via a composite action:

The recommended fix (see devcontainers/ci#442) is

persist inputs in main using saveState, then read them back from STATE_* in the post step

Even GitHub's own actions have had to work around this bug in the runner: github/codeql-action#2557 😳

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