Deterministic dotenv target selection across a multi-path cascade.
This module extracts the “which file should we edit?” logic from the FS-level editor
so plugins/tools can reuse the same selection semantics as editDotenvFile.
Notes:
Selection is based on paths only (directories), consistent with get-dotenv overlay precedence.
Default search order is reverse (last path wins).
Candidates are searched in tiers: an existing target in any path, then the env-specific
template (<target>.<templateExtension>), then (env scope only) the shared env template.
Each tier searches every path, in search order, before the next tier starts.
Deterministic dotenv target selection across a multi-path cascade.
This module extracts the “which file should we edit?” logic from the FS-level editor so plugins/tools can reuse the same selection semantics as
editDotenvFile.Notes:
pathsonly (directories), consistent with get-dotenv overlay precedence.<target>.<templateExtension>), then (env scope only) the shared env template. Each tier searches every path, in search order, before the next tier starts.