Skip to content

core: pickforgeHome ignores the HOME of the env object it is given #285

Closed

Description

@ElbertePlinio

Found while fixing #264.

pickforgeHome(env) and legacyPickforgeHomes(env) in packages/core/src/paths.ts read PICKFORGE_HOME from the env object, but when it is unset or empty they fall back to os.homedir(), which reads the process HOME. A caller that passes { PICKFORGE_HOME: "", HOME: <temp> } still gets the real ~/.pickforge/lab. That is how x11-prebind.test.ts wrote into the real sessions directory in #264. Product callers pass process.env, so they get the same answer today, but the function's contract suggests the env object decides.

  • Decide whether the fallback should use the env object's HOME, and document the choice
  • If it changes, cover CLI, MCP and desktop callers with tests

Activity

  1. added
    bug
    on Oct 7, 2026
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions