HomeClusterLabs Projects

Refactor: remoted: Strip trailing comment in load_env_vars()
9869d30cc599Unpublished

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: remoted: Strip trailing comment in load_env_vars()

We don't want to do this until after parsing the value, because a '#'
character inside a quoted value should be treated as part of the value.

Note that currently if an unquoted value ends in '#' characters, they
are treated as part of the value. I consider this a bug. For example,

name=value### # comment

would set the "name" environment variable to "value###". For an unquoted
value, I would expect "name" to be set to "value".

For a quoted value, such as

name="value###" # comment

I would indeed expect "name" to be set to "value###".

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

Details

Provenance
nrwahl2Authored on Mar 7 2025, 6:26 PM

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.