Skip to content

orgloop doctor: script transform paths with env vars (${VAR}) reported as not found #194

Description

@odink-kindo

Bug

orgloop doctor fails to expand environment variables when validating type: script transform paths, reporting a false-positive "Script not found" error even when the path resolves correctly at runtime.

Repro

In transforms/engineering.yaml:

- name: skip-sean-branches
  type: script
  script: ${ORGLOOP_PROJECT_ROOT}/scripts/skip-sean-branches.sh

With ORGLOOP_PROJECT_ROOT set in .env:

ORGLOOP_PROJECT_ROOT=/Users/odink/dev/mono/orgloop/odin-mac-studio
% orgloop doctor
✗ transform: skip-sean-branches — Script not found: ${ORGLOOP_PROJECT_ROOT}/scripts/skip-sean-branches.sh

The file exists at the expanded path. orgloop start --force starts successfully and the script transform works correctly at runtime.

Impact

orgloop doctor is called by the refresh-github-token.sh --restart script (used to refresh hourly GitHub App tokens). When doctor fails, the restart fails with exit code 1 — leaving OrgLoop down after a routine token refresh until manually recovered via orgloop start --force.

Expected behavior

Doctor should expand ${VAR} references in script: paths using the project's resolved env (from .env) before checking file existence.

Environment

  • orgloop: 0.7.8
  • macOS Darwin 25.3.0 arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions