Skip to main content

resolve_lines

Function resolve_lines 

Source
pub fn resolve_lines(current: &str, text: &str) -> Result<String, String>
Expand description

The text an agent proposes as the whole environment (lines), with the lines it can’t write kept. It is within the size, and every line is a comment, a blank or a KEY=VALUE it may write; a line that would be skipped at launch is refused rather than kept silently. A name in current that the agent may not write (a credential, a reserved name, a hidden value) stays as the operator wrote it: where the agent kept the line as env_get showed it (NAME=[hidden], or unchanged), the operator’s line goes back in that place, and one the agent left out goes at the end.