Skip to content

fix(cli): extend SQUAD_TEAM_ROOT to all resolveSquad() call sites #835

@diberry

Description

@diberry

Follow-up from PR #763 (Amanda Silver)

PR #763 wired SQUAD_TEAM_ROOT into nap, status, and cost commands. However, other commands that call resolveSquad(process.cwd()) may also break in subprocess contexts.

Action Items

  1. Audit all resolveSquad() call sites — find every place that passes process.cwd() and evaluate if it should use getSquadStartDir() instead
  2. Commands to check: init, upgrade, doctor, watch, loop, and any other command that resolves the squad directory
  3. Add integration test: Verify all commands work when SQUAD_TEAM_ROOT is set to a different directory than process.cwd()

Context

  • getSquadStartDir() returns process.env['SQUAD_TEAM_ROOT'] || process.cwd()
  • Currently only 3 of N commands use it
  • Subprocess contexts (Copilot CLI bang commands, CI pipelines, watch dispatches) all hit this

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions