Skip to content

orgloop doctor: env vars in script: paths not expanded during validation #190

Description

@odink-kindo

Bug: orgloop doctor does not expand env vars in script: path validation

Version

orgloop 0.7.8

Description

When a transform uses an env-var-anchored script: path (e.g. ${ORGLOOP_PROJECT_ROOT}/scripts/foo.sh), the doctor validation reports "Script not found" even when the env var is set and the script exists on disk.

The error message contains the unexpanded literal ${ORGLOOP_PROJECT_ROOT} rather than the resolved path, confirming the validator skips env-var substitution:

✗ transform: skip-sean-branches — Script not found: ${ORGLOOP_PROJECT_ROOT}/scripts/skip-sean-branches.sh

The script is present at the resolved path and loads correctly at runtime; only the doctor check is broken.

Reproduction

  1. Set ORGLOOP_PROJECT_ROOT=/path/to/project in your module's .env
  2. Add a transform with script: ${ORGLOOP_PROJECT_ROOT}/scripts/myscript.sh (where the script exists)
  3. Run orgloop doctor (with the env loaded)
  4. Doctor reports "Script not found: ${ORGLOOP_PROJECT_ROOT}/scripts/myscript.sh" despite the file existing

Workaround

orgloop start --daemon --supervised --force bypasses the doctor check. Runtime script execution works correctly.

Expected behaviour

The doctor should expand env vars before stat-checking script paths, consistent with how the runtime resolves them.

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