Skip to main content

save_state

Function save_state 

Source
pub fn save_state(path: &Path, env_data: &str) -> Result<()>
Expand description

Write exported variables to a state file as bash export statements.

Parses null-separated env output (from env -0), filters out bash internals, and writes export KEY='value' lines that bash can source.

ยงErrors

Returns std::io::Error if writing to path fails (e.g., permission denied, directory does not exist, disk full).