HomeClusterLabs Projects

Refactor: tools: Strip trailing whitespace in load_env_vars()
c5bccdc14bf1Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or 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

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.