-
-
Notifications
You must be signed in to change notification settings - Fork 0
Reading user- or system-level variables on Linux/macOS throws "Not implemented" #37
Copy link
Copy link
Open
Labels
area: coreTouches core library / runtime source codeTouches core library / runtime source codepriority: highNeeds attention soon — not blocking, but don't let it sitNeeds attention soon — not blocking, but don't let it sitstatus: confirmedThe issue has been verified and reproduced by a maintainerThe issue has been verified and reproduced by a maintainertype: bugSomething is broken or not behaving as expectedSomething is broken or not behaving as expected
Description
Activity
Metadata
Metadata
Assignees
Labels
area: coreTouches core library / runtime source codeTouches core library / runtime source codepriority: highNeeds attention soon — not blocking, but don't let it sitNeeds attention soon — not blocking, but don't let it sitstatus: confirmedThe issue has been verified and reproduced by a maintainerThe issue has been verified and reproduced by a maintainertype: bugSomething is broken or not behaving as expectedSomething is broken or not behaving as expected
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 onnext; 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,~/.zshenvor~/.config/environment.d/for user;/etc/environmentor/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".