Skip to content

Reading user- or system-level variables on Linux/macOS throws "Not implemented" #37

Description

@Shinrai

Problem

On Linux and macOS, reading a user-level or system-level environment variable throws Not implemented. The POSIX backend, src/platform/posix.mjs, has no implementation for those scopes. This has been the case since v1.0.2 and is still true on next; the v1.0.2 changelog notes it.

Found while backfilling the changelogs (#36).

Fix

Implement user- and system-scope reads (and writes, if they're also missing) for POSIX. Decide which files are the source of truth for each scope (for example ~/.profile, ~/.bashrc, ~/.zshenv or ~/.config/environment.d/ for user; /etc/environment or /etc/profile.d/ for system), document the choice, and add tests using a temp HOME and temp system paths. If a scope is deliberately unsupported on POSIX, throw a clear, documented error that names the scope and platform instead of a generic "Not implemented".

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: coreTouches core library / runtime source codepriority: highNeeds attention soon — not blocking, but don't let it sitstatus: confirmedThe issue has been verified and reproduced by a maintainertype: bugSomething is broken or not behaving as expected

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions