Skip to content

hypatia-scan.yml template: ${{ env.HOME }} collapses to empty string, breaking every scan #141

Closed

Description

@hyperpolymath

Summary

The hypatia-scan.yml workflow template (as distributed via
rsr-template-repo and propagated to repos like
hyperpolymath/airborne-submarine-squadron) uses
${{ env.HOME }} in a working-directory: field. GitHub Actions
does not auto-populate env.HOME in the env context
, so this
expression evaluates to the empty string, and the working-directory
becomes /hypatia (an absolute path that doesn't exist on the runner).

Every Hypatia scan on affected repos fails at the "Build Hypatia
scanner (if needed)" step with:

An error occurred trying to start process '/usr/bin/bash' with working
directory '/hypatia'. No such file or directory

Reproduction

Any repo that's pulled the current hypatia-scan.yml from the template:

Root cause

# BROKEN
- name: Build Hypatia scanner (if needed)
  working-directory: ${{ env.HOME }}/hypatia
  run: |
    ...

${{ env.HOME }} resolves to "" because HOME is a shell environment
variable, not a GitHub Actions env-context variable. Adding
env: { HOME: \${{ env.HOME }} } doesn't help because the env: context
is populated from workflow/job/step env: blocks, not from the runner
shell.

Fix

Resolve \$HOME inside a bash step instead of relying on the
working-directory key:

- name: Build Hypatia scanner (if needed)
  run: |
    cd "\$HOME/hypatia"
    if [ ! -f hypatia ]; then
      mix deps.get
      mix escript.build
    fi

Applied locally in
catachresis-colloquium/airborne-submarine-squadron@bd451ad

Impact

Every downstream repo using this template currently has zero Hypatia
coverage even though the workflow appears scheduled — the failure is
silent unless someone checks the Actions tab.

Recommend patching the template and also running a one-off sweep of
repos that have pulled this workflow file to push the fix.

Activity

  1. hyperpolymath commented on Apr 7, 2026

    @hyperpolymath
    OwnerAuthor

    Fixed in 8ac6e81 (hypatia) and propagated in c8de056 (rsr-template-repo). The workflow no longer uses ; it now uses inside the run block, avoiding the GitHub Actions env-context empty-string trap.

  2. hyperpolymath commented on Apr 7, 2026

    @hyperpolymath
    OwnerAuthor

    Resolution details (clean copy):

    • Fixed in hyperpolymath/hypatia commit 8ac6e81.
    • Propagated template fix in hyperpolymath/rsr-template-repo commit c8de056.
    • Workflow no longer uses working-directory: ${{ env.HOME }}/hypatia.
    • Build step now executes cd "$HOME/hypatia" inside run, which avoids the Actions env-context empty-string expansion trap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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