Skip to content

astrid init writes a PATH line into the user's real shell rc for every non-default ASTRID_HOME #1183

Description

@joshuajbouw

Summary

astrid init unconditionally appends an # Astrid OS + export PATH="<home>/bin:$PATH" block to the user's real ~/.zshrc — including when ASTRID_HOME points at a temporary or isolated home. The append guard keys on the exact path, so every distinct home appends a new block.

Observed on a real workstation: six accumulated # Astrid OS PATH blocks in ~/.zshrc, five pointing at long-dead temp dirs ($TMPDIR/…, session scratchpads) from isolated-home test runs, one legitimate (~/.astrid/bin).

Impact

  • Dead PATH entries accumulate silently in the operator's shell rc (harmless to resolution, but real pollution of a file users care about).
  • Any tooling that runs astrid init in an isolated ASTRID_HOME (e2e suites, the installer's own verification, CI) mutates operator state outside the home it was told to use — surprising for a runtime whose stance is fail-closed isolation.

Expected

One (or more) of:

  • Only append when the target is the default resolved home (~/.astrid), never for an ASTRID_HOME override;
  • and/or dedupe on the # Astrid OS marker (replace the block) instead of exact-path grep;
  • and/or an explicit --no-profile / respect a ASTRID_NO_PROFILE env for automation.

Fail-secure default: an isolated home should leave zero footprint outside itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliastrid-cli: command line interfacebugSomething isn't workingp2Normal — standard priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions