Skip to main content

Module environment

Module environment 

Source
Expand description

Environment resolution shared by every place a box interpreter is run.

Inheritance is intentionally preserved: this is a provenance and precedence mechanism, not a sandbox. Layers merge in order with the signed release last, so a release value wins over a caller’s and a caller’s wins over the host’s.

Windows names are compared case-insensitively, because passing both Path and PATH to a child would leave the winning value to whatever serialises the process environment rather than to this contract.

Host values are masked in the report by default. A variable inherited from the machine running the box can hold a token or a path that identifies someone, and a diagnostic that leaks it by default would be a worse failure than the one it was printed to diagnose.

Structs§

EnvironmentLayer
One layer of the environment.
EnvironmentReport
A diagnostic snapshot of the environment a box would run with.
EnvironmentSourceValue
One source’s contribution to a variable.
EnvironmentVariableReport
What the report says about one variable.
ResolveOptions
Everything needed to resolve an environment and describe it.
ResolvedEnvironment
The resolved environment, and the diagnostic describing how it was reached.

Enums§

EnvironmentSource
Where a value came from, in precedence order.
ReportMode
How much of the environment the report shows.

Functions§

resolve_environment
Merges the layers in precedence order and produces the masked diagnostic.