Skip to content

Install into $RUNNER_TEMP instead of $HOME#338

Merged
mre merged 2 commits into
lycheeverse:masterfrom
mre:fix/home-mismatch-runner
May 12, 2026
Merged

Install into $RUNNER_TEMP instead of $HOME#338
mre merged 2 commits into
lycheeverse:masterfrom
mre:fix/home-mismatch-runner

Conversation

@mre

@mre mre commented May 12, 2026

Copy link
Copy Markdown
Member

I can already see how this'll be super problematic downstream, but here we go… 😅

$HOME is evaluated in two separate composite-action shells ("Set up environment" adds $HOME/.local/bin to PATH, "Install lychee" later installs there). On runners where $HOME differs between steps — e.g. self-hosted ones where actions/checkout overrides it — those two paths diverge and the next step exits with lychee: command not found.

This swaps $HOME/.local/bin for $RUNNER_TEMP/lychee/bin. Same shape, but the path doesn't move between steps. Also gracefully handles containers where $HOME might be unset.

Fixes #337.

$HOME can change between composite-action steps on some runners
(e.g. self-hosted ones where actions/checkout temporarily overrides
it), which makes the PATH entry from the setup step point at a
different directory than the install step writes to. The result is
'lychee: command not found' even though install reported success.

$RUNNER_TEMP is guaranteed-writable and stable across steps within
a job, which is exactly what we need here.

Fixes lycheeverse#337
@mre
mre requested review from Arteiii and thomas-zahner May 12, 2026 15:25

@Arteiii Arteiii left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

With $RUNNER_TEMP the install directory is fresh per job, and
'install -t' overwrites existing files by default, so the explicit
'rm -f' step is no longer doing anything useful.
@mre
mre merged commit 6da1d14 into lycheeverse:master May 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Action fails on runners where $HOME differs between composite steps

2 participants