Skip to content

fix(package): preserve pyenv roots and initialize Zsh explicitly #6

Description

@ss-o

Problem

Both pyenv package profiles overwrite PYENV_ROOT with the package checkout and generate initialization for that directory. Existing interpreter installations and user-selected roots are consequently ignored. Initialization also relies on shell inference.

Reproduced against package main 2243d87. Both profiles fail the existing-root assertion.

Approved correction

Preserve PYENV_ROOT, defaulting to HOME/.pyenv, and generate explicit Zsh initialization at load time using that root. Refresh command lookup after initialization. Use the native program profile by default without the unnecessary bgn requirement; retain the optional bgn profile. Update examples and add a focused regression.

This is a prerequisite for z-shell/z-a-meta-plugins#73. The dynamic initialization follows https://github.com/pyenv/pyenv#installation and avoids caching shell code for the wrong root. It is a correctness tradeoff, not an unmeasured startup-speed claim.

Validation

The prepared correction passes root preservation, project selection, shim resolution and shell override/unset against upstream eb36c1b1e8509861ca4689865d65cc2740404525 with a disposable interpreter fixture. Complete real Zi install, repeat and update checks before review. No Python interpreter installation is required.

Local changes, this labeled issue and Project 28 dependency setup are approved. Publication and issue closure are outside scope.

Activity

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

    area:packagePackage or package-management work.meta:org-trackedIndicates this issue has cross-repository tracking implications (synced to Linear).type:bugSomething is broken or behaving incorrectly.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions