Skip to main content

env_quote

Function env_quote 

Source
pub fn env_quote(value: &str) -> String
Expand description

A value as it must appear after the = in a .env (Phase 23, E1).

The empty string quotes to "" rather than to nothing, because a bare KEY= is how “unset” is spelled and a deliberately empty value must not read as one. A newline is escaped rather than emitted, so the parser’s backslash line-continuation can never see one. Twin of quoteEnvValue in src/ts/state.ts, pinned by parity/env-names.json.