HomeClusterLabs Projects

Refactor: tools: Strip trailing whitespace in load_env_vars()
426a7923b542Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Refactor: tools: Strip trailing whitespace in load_env_vars()

We consider the value invalid if anything besides whitespace or a
comment (beginning with '#') follows it on the line. Further, we ignore
all trailing whitespace after a valid value. So it's fine to strip all
trailing whitespace, including a newline if present, before processing.

Clearly we must now look for '\0' where we previously looked for '\n'.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Mar 7 2025, 6:15 PM
Parents
rPc83e157c89c7: Refactor: remoted: Remove some nesting in load_env_vars()
Branches
Unknown
Tags
Unknown

Event Timeline