-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Substitution is always using the environment even when loading is set to ignore the environment.
let s = "FOO=def\nFOO_SUBBED=${FOO}123";
let cursor = Cursor::new(s.as_bytes());
let env_map = EnvLoader::with_reader(cursor)
.sequence(EnvSequence::InputOnly)
.load()?;
for (k, v) in env_map.iter() {
println!("{}: {}", k, v);
}When run with FOO=abc in the environment, the output is
FOO: def
FOO_SUBBED: abc123
This issue is due to the use of env::var in apply_subtitution. Parsing does not take into account that the environment may be ignored in the new API.
#149 related
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working